diff --git a/src/pvxs/sharedArray.h b/src/pvxs/sharedArray.h index a7d6f3c..8c7a272 100644 --- a/src/pvxs/sharedArray.h +++ b/src/pvxs/sharedArray.h @@ -143,13 +143,13 @@ public: {} // build around existing shared_ptr - sa_base(const std::shared_ptr& a, size_t len) + sa_base(const std::shared_ptr& a, size_t len) noexcept :_data(a),_count(len) {} // alias existing shared_ptr template - sa_base(const std::shared_ptr& a, E* b, size_t len) + sa_base(const std::shared_ptr& a, E* b, size_t len) noexcept :_data(a, b),_count(len) {} @@ -164,14 +164,14 @@ public: } //! Number of elements - inline size_t size() const { return _count; } + inline size_t size() const noexcept { return _count; } inline bool empty() const noexcept { return _count==0; } inline bool unique() const noexcept { return !_data || _data.use_count()<=1; } E* data() const noexcept { return _data.get(); } - const std::shared_ptr& dataPtr() const { return _data; } + const std::shared_ptr& dataPtr() const noexcept { return _data; } }; //! Provide options when rendering with std::ostream. @@ -333,7 +333,7 @@ public: * * Argument shared_ptr will likely be creating using that class's aliasing constructor. */ - shared_array(const std::shared_ptr& a, size_t len) + shared_array(const std::shared_ptr& a, size_t len) noexcept :base_t(a, len) {} @@ -358,7 +358,7 @@ public: * @endcode */ template - shared_array(const std::shared_ptr& a, E* b, size_t len) + shared_array(const std::shared_ptr& a, E* b, size_t len) noexcept :base_t(a, b, len) {} @@ -407,7 +407,7 @@ private: * Unfortunately, many of the MSVC (<= VS 2010) STL methods assert() that iterators are never NULL. * So we fudge here by abusing 'this' so that our iterators are always !NULL. */ - inline E* base_ptr() const { + inline E* base_ptr() const noexcept { #if defined(_MSC_VER) && _MSC_VER<=1600 return this->_count ? this->_data.get() : (E*)(this-1); #else @@ -656,14 +656,14 @@ public: {} //! build around existing shared_ptr and length - shared_array(const std::shared_ptr& a, size_t len, ArrayType type) + shared_array(const std::shared_ptr& a, size_t len, ArrayType type) noexcept :base_t(a, len) ,_type(type) {} //! alias existing shared_ptr and length template - shared_array(const std::shared_ptr& a, E* b, size_t len) + shared_array(const std::shared_ptr& a, E* b, size_t len) noexcept :base_t(a, b, len) ,_type(detail::CaptureBase::code) {} @@ -690,7 +690,7 @@ public: size_t max_size() const noexcept{return (size_t)-1;} - inline ArrayType original_type() const { return _type; } + inline ArrayType original_type() const noexcept { return _type; } shared_array::type> freeze() {