diff --git a/include/boost/container/allocator.hpp b/include/boost/container/allocator.hpp index b245c6f..45feaf1 100644 --- a/include/boost/container/allocator.hpp +++ b/include/boost/container/allocator.hpp @@ -193,17 +193,17 @@ class allocator //!Deallocates previously allocated memory. //!Never throws - BOOST_CONTAINER_FORCEINLINE void deallocate(pointer ptr, size_type) BOOST_NOEXCEPT_OR_NOTHROW + inline void deallocate(pointer ptr, size_type) BOOST_NOEXCEPT_OR_NOTHROW { dlmalloc_free(ptr); } //!Returns the maximum number of elements that could be allocated. //!Never throws - BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW + inline size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW { return size_type(-1)/(2u*sizeof(T)); } //!Swaps two allocators, does nothing //!because this allocator is stateless - BOOST_CONTAINER_FORCEINLINE friend void swap(self_t &, self_t &) BOOST_NOEXCEPT_OR_NOTHROW + inline friend void swap(self_t &, self_t &) BOOST_NOEXCEPT_OR_NOTHROW {} //!An allocator always compares to true, as memory allocated with one @@ -214,7 +214,7 @@ class allocator //!An allocator always compares to false, as memory allocated with one //!instance can be deallocated by another instance - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator!=(const allocator &, const allocator &) BOOST_NOEXCEPT_OR_NOTHROW { return false; } @@ -251,7 +251,7 @@ class allocator //!must be deallocated only with deallocate_one(). //!Throws bad_alloc if there is no enough memory //!This function is available only with Version == 2 - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE pointer allocate_one() + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline pointer allocate_one() { BOOST_STATIC_ASSERT(( Version > 1 )); return this->allocate(1); @@ -260,7 +260,7 @@ class allocator //!Allocates many elements of size == 1. //!Elements must be individually deallocated with deallocate_one() //!This function is available only with Version == 2 - BOOST_CONTAINER_FORCEINLINE void allocate_individual(std::size_t num_elements, multiallocation_chain &chain) + inline void allocate_individual(std::size_t num_elements, multiallocation_chain &chain) { BOOST_STATIC_ASSERT(( Version > 1 )); this->allocate_many(1, num_elements, chain); @@ -278,7 +278,7 @@ class allocator //!Deallocates memory allocated with allocate_one() or allocate_individual(). //!This function is available only with Version == 2 - BOOST_CONTAINER_FORCEINLINE + inline void deallocate_individual(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW { BOOST_STATIC_ASSERT(( Version > 1 )); diff --git a/include/boost/container/allocator_traits.hpp b/include/boost/container/allocator_traits.hpp index f5f73ef..f9a219a 100644 --- a/include/boost/container/allocator_traits.hpp +++ b/include/boost/container/allocator_traits.hpp @@ -298,18 +298,18 @@ struct allocator_traits //! Returns: a.allocate(n) //! - BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n) + inline static pointer allocate(Allocator &a, size_type n) { return a.allocate(n); } //! Returns: a.deallocate(p, n) //! //! Throws: Nothing - BOOST_CONTAINER_FORCEINLINE static void deallocate(Allocator &a, pointer p, size_type n) + inline static void deallocate(Allocator &a, pointer p, size_type n) { a.deallocate(p, n); } //! Effects: calls a.allocate(n, p) if that call is well-formed; //! otherwise, invokes a.allocate(n) - BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n, const_void_pointer p) + inline static pointer allocate(Allocator &a, size_type n, const_void_pointer p) { const bool value = boost::container::dtl:: has_member_function_callable_with_allocate @@ -321,7 +321,7 @@ struct allocator_traits //! Effects: calls a.destroy(p) if that call is well-formed; //! otherwise, invokes p->~T(). template - BOOST_CONTAINER_FORCEINLINE static void destroy(Allocator &a, T*p) BOOST_NOEXCEPT_OR_NOTHROW + inline static void destroy(Allocator &a, T*p) BOOST_NOEXCEPT_OR_NOTHROW { typedef T* destroy_pointer; const bool value = boost::container::dtl:: @@ -333,7 +333,7 @@ struct allocator_traits //! Returns: a.max_size() if that expression is well-formed; otherwise, //! numeric_limits::max(). - BOOST_CONTAINER_FORCEINLINE static size_type max_size(const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW + inline static size_type max_size(const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW { const bool value = allocator_traits_detail::has_max_size::value; dtl::bool_ flag; @@ -342,7 +342,7 @@ struct allocator_traits //! Returns: a.select_on_container_copy_construction() if that expression is well-formed; //! otherwise, a. - BOOST_CONTAINER_FORCEINLINE static BOOST_CONTAINER_DOC1ST(Allocator, + inline static BOOST_CONTAINER_DOC1ST(Allocator, typename dtl::if_c < allocator_traits_detail::has_select_on_container_copy_construction::value BOOST_MOVE_I Allocator BOOST_MOVE_I const Allocator & >::type) @@ -358,7 +358,7 @@ struct allocator_traits //! Effects: calls a.construct(p, std::forward(args)...) if that call is well-formed; //! otherwise, invokes `placement new` (static_cast(p)) T(std::forward(args)...) template - BOOST_CONTAINER_FORCEINLINE static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args) + inline static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args) { static const bool value = ::boost::move_detail::and_ < dtl::is_not_std_allocator @@ -372,7 +372,7 @@ struct allocator_traits //! Returns: a.storage_is_unpropagable(p) if is_partially_propagable::value is true; otherwise, //! false. - BOOST_CONTAINER_FORCEINLINE static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW + inline static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW { dtl::bool_ flag; return allocator_traits::priv_storage_is_unpropagable(flag, a, p); @@ -380,7 +380,7 @@ struct allocator_traits //! Returns: true if is_always_equal::value == true, otherwise, //! a == b. - BOOST_CONTAINER_FORCEINLINE static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW + inline static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW { dtl::bool_ flag; return allocator_traits::priv_equal(flag, a, b); @@ -388,46 +388,46 @@ struct allocator_traits #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) private: - BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::true_type, Allocator &a, size_type n, const_void_pointer p) + inline static pointer priv_allocate(dtl::true_type, Allocator &a, size_type n, const_void_pointer p) { return a.allocate(n, p); } - BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::false_type, Allocator &a, size_type n, const_void_pointer) + inline static pointer priv_allocate(dtl::false_type, Allocator &a, size_type n, const_void_pointer) { return a.allocate(n); } template - BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW + inline static void priv_destroy(dtl::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW { a.destroy(p); } template - BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW + inline static void priv_destroy(dtl::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW { p->~T(); (void)p; } - BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW + inline static size_type priv_max_size(dtl::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW { return a.max_size(); } - BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW + inline static size_type priv_max_size(dtl::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW { return size_type(-1)/sizeof(value_type); } - BOOST_CONTAINER_FORCEINLINE static Allocator priv_select_on_container_copy_construction(dtl::true_type, const Allocator &a) + inline static Allocator priv_select_on_container_copy_construction(dtl::true_type, const Allocator &a) { return a.select_on_container_copy_construction(); } - BOOST_CONTAINER_FORCEINLINE static const Allocator &priv_select_on_container_copy_construction(dtl::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW + inline static const Allocator &priv_select_on_container_copy_construction(dtl::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW { return a; } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args) + inline static void priv_construct(dtl::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args) { a.construct( p, ::boost::forward(args)...); } template - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args) + inline static void priv_construct(dtl::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args) { ::new((void*)p, boost_container_new_t()) T(::boost::forward(args)...); } #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) public: #define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL(N) \ template\ - BOOST_CONTAINER_FORCEINLINE static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ {\ static const bool value = ::boost::move_detail::and_ \ < dtl::is_not_std_allocator \ @@ -447,11 +447,11 @@ struct allocator_traits ///////////////////////////////// #define BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL(N) \ template\ - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline static void priv_construct(dtl::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { a.construct( p BOOST_MOVE_I##N BOOST_MOVE_FWD##N ); }\ \ template\ - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline static void priv_construct(dtl::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { ::new((void*)p, boost_container_new_t()) T(BOOST_MOVE_FWD##N); }\ // BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL) @@ -460,19 +460,19 @@ struct allocator_traits #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, const ::boost::container::default_init_t&) + inline static void priv_construct(dtl::false_type, Allocator &, T *p, const ::boost::container::default_init_t&) { ::new((void*)p, boost_container_new_t()) T; } - BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::true_type, const Allocator &a, pointer p) + inline static bool priv_storage_is_unpropagable(dtl::true_type, const Allocator &a, pointer p) { return a.storage_is_unpropagable(p); } - BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::false_type, const Allocator &, pointer) + inline static bool priv_storage_is_unpropagable(dtl::false_type, const Allocator &, pointer) { return false; } - BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::true_type, const Allocator &, const Allocator &) + inline static bool priv_equal(dtl::true_type, const Allocator &, const Allocator &) { return true; } - BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::false_type, const Allocator &a, const Allocator &b) + inline static bool priv_equal(dtl::false_type, const Allocator &a, const Allocator &b) { return a == b; } #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) diff --git a/include/boost/container/deque.hpp b/include/boost/container/deque.hpp index dafcaa0..3265a42 100644 --- a/include/boost/container/deque.hpp +++ b/include/boost/container/deque.hpp @@ -142,47 +142,47 @@ class deque_iterator public: - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE Pointer get_cur() const { return m_cur; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE Pointer get_first() const { return m_first; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE Pointer get_last() const { return m_last; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE index_pointer get_node() const { return m_node; } + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline Pointer get_cur() const { return m_cur; } + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline Pointer get_first() const { return m_first; } + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline Pointer get_last() const { return m_last; } + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline index_pointer get_node() const { return m_node; } - BOOST_CONTAINER_FORCEINLINE deque_iterator(val_alloc_ptr x, index_pointer y, difference_type block_size) BOOST_NOEXCEPT_OR_NOTHROW + inline deque_iterator(val_alloc_ptr x, index_pointer y, difference_type block_size) BOOST_NOEXCEPT_OR_NOTHROW : m_cur(x), m_first(*y), m_last(*y + block_size), m_node(y) {} - BOOST_CONTAINER_FORCEINLINE deque_iterator(val_alloc_ptr x, index_pointer y, size_type block_size) BOOST_NOEXCEPT_OR_NOTHROW + inline deque_iterator(val_alloc_ptr x, index_pointer y, size_type block_size) BOOST_NOEXCEPT_OR_NOTHROW : m_cur(x), m_first(*y), m_last(*y + difference_type(block_size)), m_node(y) {} - BOOST_CONTAINER_FORCEINLINE deque_iterator() BOOST_NOEXCEPT_OR_NOTHROW + inline deque_iterator() BOOST_NOEXCEPT_OR_NOTHROW : m_cur(), m_first(), m_last(), m_node() //Value initialization to achieve "null iterators" (N3644) {} - BOOST_CONTAINER_FORCEINLINE deque_iterator(const deque_iterator& x) BOOST_NOEXCEPT_OR_NOTHROW + inline deque_iterator(const deque_iterator& x) BOOST_NOEXCEPT_OR_NOTHROW : m_cur(x.get_cur()), m_first(x.get_first()), m_last(x.get_last()), m_node(x.get_node()) {} - BOOST_CONTAINER_FORCEINLINE deque_iterator(const nonconst_iterator& x) BOOST_NOEXCEPT_OR_NOTHROW + inline deque_iterator(const nonconst_iterator& x) BOOST_NOEXCEPT_OR_NOTHROW : m_cur(x.get_cur()), m_first(x.get_first()), m_last(x.get_last()), m_node(x.get_node()) {} - BOOST_CONTAINER_FORCEINLINE deque_iterator(Pointer cur, Pointer first, Pointer last, index_pointer node) BOOST_NOEXCEPT_OR_NOTHROW + inline deque_iterator(Pointer cur, Pointer first, Pointer last, index_pointer node) BOOST_NOEXCEPT_OR_NOTHROW : m_cur(cur), m_first(first), m_last(last), m_node(node) {} - BOOST_CONTAINER_FORCEINLINE deque_iterator& operator=(const deque_iterator& x) BOOST_NOEXCEPT_OR_NOTHROW + inline deque_iterator& operator=(const deque_iterator& x) BOOST_NOEXCEPT_OR_NOTHROW { m_cur = x.get_cur(); m_first = x.get_first(); m_last = x.get_last(); m_node = x.get_node(); return *this; } - BOOST_CONTAINER_FORCEINLINE deque_iterator unconst() const BOOST_NOEXCEPT_OR_NOTHROW + inline deque_iterator unconst() const BOOST_NOEXCEPT_OR_NOTHROW { return deque_iterator(this->get_cur(), this->get_first(), this->get_last(), this->get_node()); } - BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW + inline reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW { return *this->m_cur; } - BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW + inline pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW { return this->m_cur; } BOOST_CONTAINER_ATTRIBUTE_NODISCARD difference_type operator-(const deque_iterator& x) const BOOST_NOEXCEPT_OR_NOTHROW @@ -209,7 +209,7 @@ class deque_iterator return *this; } - BOOST_CONTAINER_FORCEINLINE deque_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW + inline deque_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW { deque_iterator tmp(*this); ++*this; @@ -229,7 +229,7 @@ class deque_iterator return *this; } - BOOST_CONTAINER_FORCEINLINE deque_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW + inline deque_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW { deque_iterator tmp(*this); --*this; @@ -257,55 +257,55 @@ class deque_iterator return *this; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline deque_iterator operator+(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW { deque_iterator tmp(*this); return tmp += n; } - BOOST_CONTAINER_FORCEINLINE + inline deque_iterator& operator-=(difference_type n) BOOST_NOEXCEPT_OR_NOTHROW { return *this += -n; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline deque_iterator operator-(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW { deque_iterator tmp(*this); return tmp -= n; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference operator[](difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW { return *(*this + n); } //Comparisons - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator==(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return l.m_cur == r.m_cur; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator!=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return l.m_cur != r.m_cur; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return (l.m_node == r.m_node) ? (l.m_cur < r.m_cur) : (l.m_node < r.m_node); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return r < l; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return !(r < l); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return !(l < r); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend deque_iterator operator+(difference_type n, deque_iterator x) BOOST_NOEXCEPT_OR_NOTHROW { return x += n; } - BOOST_CONTAINER_FORCEINLINE void priv_set_node(index_pointer new_node, size_type block_size) BOOST_NOEXCEPT_OR_NOTHROW + inline void priv_set_node(index_pointer new_node, size_type block_size) BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_set_node(new_node, difference_type(block_size)); } - BOOST_CONTAINER_FORCEINLINE void priv_set_node(index_pointer new_node, difference_type block_size) BOOST_NOEXCEPT_OR_NOTHROW + inline void priv_set_node(index_pointer new_node, difference_type block_size) BOOST_NOEXCEPT_OR_NOTHROW { this->m_node = new_node; this->m_first = *new_node; @@ -363,40 +363,40 @@ class deque_base typedef dtl::deque_iterator iterator; typedef dtl::deque_iterator const_iterator; - BOOST_CONSTEXPR BOOST_CONTAINER_FORCEINLINE static size_type get_block_size() BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONSTEXPR inline static size_type get_block_size() BOOST_NOEXCEPT_OR_NOTHROW { return deque_block_size::value; } - BOOST_CONSTEXPR BOOST_CONTAINER_FORCEINLINE static val_alloc_diff get_block_ssize() BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONSTEXPR inline static val_alloc_diff get_block_ssize() BOOST_NOEXCEPT_OR_NOTHROW { return val_alloc_diff((get_block_size)()); } typedef deque_value_traits traits_t; typedef ptr_alloc_t map_allocator_type; - BOOST_CONTAINER_FORCEINLINE val_alloc_ptr priv_allocate_node() + inline val_alloc_ptr priv_allocate_node() { return this->alloc().allocate(get_block_size()); } - BOOST_CONTAINER_FORCEINLINE void priv_deallocate_node(val_alloc_ptr p) BOOST_NOEXCEPT_OR_NOTHROW + inline void priv_deallocate_node(val_alloc_ptr p) BOOST_NOEXCEPT_OR_NOTHROW { this->alloc().deallocate(p, get_block_size()); } - BOOST_CONTAINER_FORCEINLINE ptr_alloc_ptr priv_allocate_map(size_type n) + inline ptr_alloc_ptr priv_allocate_map(size_type n) { return this->ptr_alloc().allocate(n); } - BOOST_CONTAINER_FORCEINLINE void priv_deallocate_map(ptr_alloc_ptr p, size_type n) BOOST_NOEXCEPT_OR_NOTHROW + inline void priv_deallocate_map(ptr_alloc_ptr p, size_type n) BOOST_NOEXCEPT_OR_NOTHROW { this->ptr_alloc().deallocate(p, n); } - BOOST_CONTAINER_FORCEINLINE deque_base(size_type num_elements, const allocator_type& a) + inline deque_base(size_type num_elements, const allocator_type& a) : members_(a) { this->priv_initialize_map(num_elements); } - BOOST_CONTAINER_FORCEINLINE explicit deque_base(const allocator_type& a) + inline explicit deque_base(const allocator_type& a) : members_(a) {} - BOOST_CONTAINER_FORCEINLINE deque_base() + inline deque_base() : members_() {} - BOOST_CONTAINER_FORCEINLINE explicit deque_base(BOOST_RV_REF(deque_base) x) + inline explicit deque_base(BOOST_RV_REF(deque_base) x) : members_( boost::move(x.ptr_alloc()) , boost::move(x.alloc()) ) {} @@ -516,16 +516,16 @@ class deque_base iterator m_finish; } members_; - BOOST_CONTAINER_FORCEINLINE ptr_alloc_t &ptr_alloc() BOOST_NOEXCEPT_OR_NOTHROW + inline ptr_alloc_t &ptr_alloc() BOOST_NOEXCEPT_OR_NOTHROW { return members_; } - BOOST_CONTAINER_FORCEINLINE const ptr_alloc_t &ptr_alloc() const BOOST_NOEXCEPT_OR_NOTHROW + inline const ptr_alloc_t &ptr_alloc() const BOOST_NOEXCEPT_OR_NOTHROW { return members_; } - BOOST_CONTAINER_FORCEINLINE allocator_type &alloc() BOOST_NOEXCEPT_OR_NOTHROW + inline allocator_type &alloc() BOOST_NOEXCEPT_OR_NOTHROW { return members_; } - BOOST_CONTAINER_FORCEINLINE const allocator_type &alloc() const BOOST_NOEXCEPT_OR_NOTHROW + inline const allocator_type &alloc() const BOOST_NOEXCEPT_OR_NOTHROW { return members_; } }; #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED @@ -600,7 +600,7 @@ class deque : protected deque_base::type, //! Throws: If allocator_type's default constructor throws. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE deque() + inline deque() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value) : Base() {} @@ -610,7 +610,7 @@ class deque : protected deque_base::type, //! Throws: Nothing //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit deque(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW + inline explicit deque(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW : Base(a) {} @@ -621,7 +621,7 @@ class deque : protected deque_base::type, //! throws or T's value initialization throws. //! //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE explicit deque(size_type n) + inline explicit deque(size_type n) : Base(n, allocator_type()) { dtl::insert_value_initialized_n_proxy proxy; @@ -638,7 +638,7 @@ class deque : protected deque_base::type, //! Complexity: Linear to n. //! //! Note: Non-standard extension - BOOST_CONTAINER_FORCEINLINE deque(size_type n, default_init_t) + inline deque(size_type n, default_init_t) : Base(n, allocator_type()) { dtl::insert_default_initialized_n_proxy proxy; @@ -653,7 +653,7 @@ class deque : protected deque_base::type, //! throws or T's value initialization throws. //! //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE explicit deque(size_type n, const allocator_type &a) + inline explicit deque(size_type n, const allocator_type &a) : Base(n, a) { dtl::insert_value_initialized_n_proxy proxy; @@ -670,7 +670,7 @@ class deque : protected deque_base::type, //! Complexity: Linear to n. //! //! Note: Non-standard extension - BOOST_CONTAINER_FORCEINLINE deque(size_type n, default_init_t, const allocator_type &a) + inline deque(size_type n, default_init_t, const allocator_type &a) : Base(n, a) { dtl::insert_default_initialized_n_proxy proxy; @@ -685,7 +685,7 @@ class deque : protected deque_base::type, //! throws or T's copy constructor throws. //! //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE deque(size_type n, const value_type& value) + inline deque(size_type n, const value_type& value) : Base(n, allocator_type()) { this->priv_fill_initialize(value); } @@ -696,7 +696,7 @@ class deque : protected deque_base::type, //! throws or T's copy constructor throws. //! //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE deque(size_type n, const value_type& value, const allocator_type& a) + inline deque(size_type n, const value_type& value, const allocator_type& a) : Base(n, a) { this->priv_fill_initialize(value); } @@ -708,7 +708,7 @@ class deque : protected deque_base::type, //! //! Complexity: Linear to the range [first, last). template - BOOST_CONTAINER_FORCEINLINE deque(InIt first, InIt last + inline deque(InIt first, InIt last #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) , typename dtl::disable_if_convertible ::type * = 0 @@ -727,7 +727,7 @@ class deque : protected deque_base::type, //! //! Complexity: Linear to the range [first, last). template - BOOST_CONTAINER_FORCEINLINE deque(InIt first, InIt last, const allocator_type& a + inline deque(InIt first, InIt last, const allocator_type& a #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) , typename dtl::disable_if_convertible ::type * = 0 @@ -746,7 +746,7 @@ class deque : protected deque_base::type, //! throws or T's constructor taking a dereferenced std::initializer_list iterator throws. //! //! Complexity: Linear to the range [il.begin(), il.end()). - BOOST_CONTAINER_FORCEINLINE deque(std::initializer_list il, const allocator_type& a = allocator_type()) + inline deque(std::initializer_list il, const allocator_type& a = allocator_type()) : Base(a) { this->priv_range_initialize(il.begin(), il.end()); @@ -758,7 +758,7 @@ class deque : protected deque_base::type, //! Postcondition: x == *this. //! //! Complexity: Linear to the elements x contains. - BOOST_CONTAINER_FORCEINLINE deque(const deque& x) + inline deque(const deque& x) : Base(allocator_traits_type::select_on_container_copy_construction(x.alloc())) { if(x.size()){ @@ -773,7 +773,7 @@ class deque : protected deque_base::type, //! Throws: If allocator_type's copy constructor throws. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE deque(BOOST_RV_REF(deque) x) BOOST_NOEXCEPT_OR_NOTHROW + inline deque(BOOST_RV_REF(deque) x) BOOST_NOEXCEPT_OR_NOTHROW : Base(BOOST_MOVE_BASE(Base, x)) { this->swap_members(x); } @@ -824,7 +824,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Linear to the number of elements. - BOOST_CONTAINER_FORCEINLINE ~deque() BOOST_NOEXCEPT_OR_NOTHROW + inline ~deque() BOOST_NOEXCEPT_OR_NOTHROW { this->priv_destroy_range(this->members_.m_start, this->members_.m_finish); } @@ -903,7 +903,7 @@ class deque : protected deque_base::type, //! Throws: If memory allocation throws or T's copy constructor throws. //! //! Complexity: Linear to the number of elements in il. - BOOST_CONTAINER_FORCEINLINE deque& operator=(std::initializer_list il) + inline deque& operator=(std::initializer_list il) { this->assign(il.begin(), il.end()); return *this; @@ -915,7 +915,7 @@ class deque : protected deque_base::type, //! Throws: If memory allocation throws or T's copy constructor throws. //! //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE void assign(size_type n, const T& val) + inline void assign(size_type n, const T& val) { this->assign(c_it(val, n), c_it()); } @@ -979,7 +979,7 @@ class deque : protected deque_base::type, //! T's constructor from dereferencing std::initializer_list iterator throws. //! //! Complexity: Linear to il.size(). - BOOST_CONTAINER_FORCEINLINE void assign(std::initializer_list il) + inline void assign(std::initializer_list il) { this->assign(il.begin(), il.end()); } #endif @@ -988,7 +988,7 @@ class deque : protected deque_base::type, //! Throws: If allocator's copy constructor throws. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return Base::alloc(); } @@ -999,7 +999,7 @@ class deque : protected deque_base::type, //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return Base::alloc(); } @@ -1016,7 +1016,7 @@ class deque : protected deque_base::type, //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW { return Base::alloc(); } @@ -1025,7 +1025,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator begin() BOOST_NOEXCEPT_OR_NOTHROW { return this->members_.m_start; } @@ -1034,7 +1034,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW { return this->members_.m_start; } @@ -1043,7 +1043,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator end() BOOST_NOEXCEPT_OR_NOTHROW { return this->members_.m_finish; } @@ -1052,7 +1052,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW { return this->members_.m_finish; } @@ -1062,7 +1062,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW { return reverse_iterator(this->members_.m_finish); } @@ -1072,7 +1072,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return const_reverse_iterator(this->members_.m_finish); } @@ -1082,7 +1082,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW { return reverse_iterator(this->members_.m_start); } @@ -1092,7 +1092,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW { return const_reverse_iterator(this->members_.m_start); } @@ -1101,7 +1101,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return this->members_.m_start; } @@ -1110,7 +1110,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW { return this->members_.m_finish; } @@ -1120,7 +1120,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return const_reverse_iterator(this->members_.m_finish); } @@ -1130,7 +1130,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW { return const_reverse_iterator(this->members_.m_start); } @@ -1145,7 +1145,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool empty() const BOOST_NOEXCEPT_OR_NOTHROW { return this->members_.m_finish == this->members_.m_start; } @@ -1154,7 +1154,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type size() const BOOST_NOEXCEPT_OR_NOTHROW { return size_type(this->members_.m_finish - this->members_.m_start); } @@ -1163,7 +1163,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW { return allocator_traits_type::max_size(this->alloc()); } @@ -1251,7 +1251,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference front() BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1266,7 +1266,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1281,7 +1281,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference back() BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1296,7 +1296,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1311,7 +1311,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(this->size() > n); @@ -1326,7 +1326,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(this->size() > n); @@ -1344,7 +1344,7 @@ class deque : protected deque_base::type, //! Complexity: Constant. //! //! Note: Non-standard extension - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(this->size() >= n); @@ -1362,7 +1362,7 @@ class deque : protected deque_base::type, //! Complexity: Constant. //! //! Note: Non-standard extension - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(this->size() >= n); @@ -1379,7 +1379,7 @@ class deque : protected deque_base::type, //! Complexity: Constant. //! //! Note: Non-standard extension - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW { //Range checked priv_index_of @@ -1396,7 +1396,7 @@ class deque : protected deque_base::type, //! Complexity: Constant. //! //! Note: Non-standard extension - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW { //Range checked priv_index_of @@ -1411,7 +1411,7 @@ class deque : protected deque_base::type, //! Throws: range_error if n >= size() //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference at(size_type n) { this->priv_throw_if_out_of_range(n); @@ -1426,7 +1426,7 @@ class deque : protected deque_base::type, //! Throws: range_error if n >= size() //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference at(size_type n) const { this->priv_throw_if_out_of_range(n); @@ -1659,7 +1659,7 @@ class deque : protected deque_base::type, //! Throws: If memory allocation throws or T's copy constructor throws. //! //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator pos, size_type n, const value_type& x) + inline iterator insert(const_iterator pos, size_type n, const value_type& x) { //Range check of p is done by insert() return this->insert(pos, c_it(x, n), c_it()); @@ -1708,7 +1708,7 @@ class deque : protected deque_base::type, //! dereferenced std::initializer_list throws or T's copy constructor throws. //! //! Complexity: Linear to distance [il.begin(), il.end()). - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator pos, std::initializer_list il) + inline iterator insert(const_iterator pos, std::initializer_list il) { //Range check os pos is done in insert() return insert(pos, il.begin(), il.end()); @@ -1717,7 +1717,7 @@ class deque : protected deque_base::type, #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) template - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, FwdIt first, FwdIt last + inline iterator insert(const_iterator p, FwdIt first, FwdIt last #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) , typename dtl::disable_if_or < void @@ -1838,7 +1838,7 @@ class deque : protected deque_base::type, //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE void swap(deque &x) + inline void swap(deque &x) BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value || allocator_traits_type::is_always_equal::value) { @@ -1879,56 +1879,56 @@ class deque : protected deque_base::type, //! Effects: Returns true if x and y are equal //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator==(const deque& x, const deque& y) { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } //! Effects: Returns true if x and y are unequal //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator!=(const deque& x, const deque& y) { return !(x == y); } //! Effects: Returns true if x is less than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<(const deque& x, const deque& y) { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } //! Effects: Returns true if x is greater than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>(const deque& x, const deque& y) { return y < x; } //! Effects: Returns true if x is equal or less than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<=(const deque& x, const deque& y) { return !(y < x); } //! Effects: Returns true if x is equal or greater than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>=(const deque& x, const deque& y) { return !(x < y); } //! Effects: x.swap(y) //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE friend void swap(deque& x, deque& y) + inline friend void swap(deque& x, deque& y) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y))) { x.swap(y); } #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED private: - BOOST_CONTAINER_FORCEINLINE size_type priv_index_of(const_iterator p) const + inline size_type priv_index_of(const_iterator p) const { BOOST_ASSERT(this->cbegin() <= p); BOOST_ASSERT(p <= this->cend()); @@ -1954,12 +1954,12 @@ class deque : protected deque_base::type, throw_out_of_range("deque::at out of range"); } - BOOST_CONTAINER_FORCEINLINE bool priv_in_range(const_iterator pos) const + inline bool priv_in_range(const_iterator pos) const { return (this->begin() <= pos) && (pos < this->end()); } - BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const + inline bool priv_in_range_or_end(const_iterator pos) const { return (this->begin() <= pos) && (pos <= this->end()); } @@ -2013,32 +2013,32 @@ class deque : protected deque_base::type, } } - BOOST_CONTAINER_FORCEINLINE bool priv_push_back_simple_available() const + inline bool priv_push_back_simple_available() const { return this->members_.m_map && (this->members_.m_finish.m_cur != (this->members_.m_finish.m_last - 1)); } - BOOST_CONTAINER_FORCEINLINE T *priv_push_back_simple_pos() const + inline T *priv_push_back_simple_pos() const { return boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur); } - BOOST_CONTAINER_FORCEINLINE void priv_push_back_simple_commit() + inline void priv_push_back_simple_commit() { ++this->members_.m_finish.m_cur; } - BOOST_CONTAINER_FORCEINLINE bool priv_push_front_simple_available() const + inline bool priv_push_front_simple_available() const { return this->members_.m_map && (this->members_.m_start.m_cur != this->members_.m_start.m_first); } - BOOST_CONTAINER_FORCEINLINE T *priv_push_front_simple_pos() const + inline T *priv_push_front_simple_pos() const { return boost::movelib::to_raw_pointer(this->members_.m_start.m_cur) - 1; } - BOOST_CONTAINER_FORCEINLINE void priv_push_front_simple_commit() + inline void priv_push_front_simple_commit() { --this->members_.m_start.m_cur; } void priv_destroy_range(iterator p, iterator p2) @@ -2165,7 +2165,7 @@ class deque : protected deque_base::type, return new_start; } - BOOST_CONTAINER_FORCEINLINE iterator priv_fill_insert(const_iterator pos, size_type n, const value_type& x) + inline iterator priv_fill_insert(const_iterator pos, size_type n, const value_type& x) { return this->insert(pos, c_it(x, n), c_it()); } diff --git a/include/boost/container/detail/advanced_insert_int.hpp b/include/boost/container/detail/advanced_insert_int.hpp index 0238805..bc6801a 100644 --- a/include/boost/container/detail/advanced_insert_int.hpp +++ b/include/boost/container/detail/advanced_insert_int.hpp @@ -49,19 +49,19 @@ struct move_insert_range_proxy { typedef typename allocator_traits::value_type value_type; - BOOST_CONTAINER_FORCEINLINE explicit move_insert_range_proxy(FwdIt first) + inline explicit move_insert_range_proxy(FwdIt first) : first_(first) {} template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) + inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) { this->first_ = ::boost::container::uninitialized_move_alloc_n_source (a, this->first_, n, p); } template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) + inline void copy_n_and_update(Allocator &, Iterator p, std::size_t n) { this->first_ = ::boost::container::move_n_source(this->first_, n, p); } @@ -75,18 +75,18 @@ struct insert_range_proxy { typedef typename allocator_traits::value_type value_type; - BOOST_CONTAINER_FORCEINLINE explicit insert_range_proxy(FwdIt first) + inline explicit insert_range_proxy(FwdIt first) : first_(first) {} template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) + inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) { this->first_ = ::boost::container::uninitialized_copy_alloc_n_source(a, this->first_, n, p); } template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) + inline void copy_n_and_update(Allocator &, Iterator p, std::size_t n) { this->first_ = ::boost::container::copy_n_source(this->first_, n, p); } @@ -100,16 +100,16 @@ struct insert_n_copies_proxy { typedef typename allocator_traits::value_type value_type; - BOOST_CONTAINER_FORCEINLINE explicit insert_n_copies_proxy(const value_type &v) + inline explicit insert_n_copies_proxy(const value_type &v) : v_(v) {} template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const + inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const { boost::container::uninitialized_fill_alloc_n(a, v_, n, p); } template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const + inline void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const { while (n){ --n; @@ -129,7 +129,7 @@ struct insert_value_initialized_n_proxy typedef typename dtl::aligned_storage::value>::type storage_t; template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const + inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const { boost::container::uninitialized_value_init_alloc_n(a, n, p); } template @@ -155,7 +155,7 @@ struct insert_default_initialized_n_proxy typedef typename dtl::aligned_storage::value>::type storage_t; template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const + inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const { boost::container::uninitialized_default_init_alloc_n(a, n, p); } template @@ -183,19 +183,19 @@ struct insert_copy_proxy static const bool single_value = true; - BOOST_CONTAINER_FORCEINLINE explicit insert_copy_proxy(const value_type &v) + inline explicit insert_copy_proxy(const value_type &v) : v_(v) {} template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const + inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const { BOOST_ASSERT(n == 1); (void)n; alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), v_); } template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const + inline void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const { BOOST_ASSERT(n == 1); (void)n; *p = v_; @@ -213,19 +213,19 @@ struct insert_move_proxy static const bool single_value = true; - BOOST_CONTAINER_FORCEINLINE explicit insert_move_proxy(value_type &v) + inline explicit insert_move_proxy(value_type &v) : v_(v) {} template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const + inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const { BOOST_ASSERT(n == 1); (void)n; alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::move(v_) ); } template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const + inline void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const { BOOST_ASSERT(n == 1); (void)n; *p = ::boost::move(v_); @@ -235,13 +235,13 @@ struct insert_move_proxy }; template -BOOST_CONTAINER_FORCEINLINE insert_move_proxy get_insert_value_proxy(BOOST_RV_REF(typename boost::container::iterator_traits::value_type) v) +inline insert_move_proxy get_insert_value_proxy(BOOST_RV_REF(typename boost::container::iterator_traits::value_type) v) { return insert_move_proxy(v); } template -BOOST_CONTAINER_FORCEINLINE insert_copy_proxy get_insert_value_proxy(const typename boost::container::iterator_traits::value_type &v) +inline insert_copy_proxy get_insert_value_proxy(const typename boost::container::iterator_traits::value_type &v) { return insert_copy_proxy(v); } @@ -266,17 +266,17 @@ struct insert_nonmovable_emplace_proxy static const bool single_value = true; - BOOST_CONTAINER_FORCEINLINE explicit insert_nonmovable_emplace_proxy(BOOST_FWD_REF(Args)... args) + inline explicit insert_nonmovable_emplace_proxy(BOOST_FWD_REF(Args)... args) : args_(args...) {} template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) + inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) { this->priv_uninitialized_copy_some_and_update(a, index_tuple_t(), p, n); } private: template - BOOST_CONTAINER_FORCEINLINE void priv_uninitialized_copy_some_and_update(Allocator &a, const index_tuple&, Iterator p, std::size_t n) + inline void priv_uninitialized_copy_some_and_update(Allocator &a, const index_tuple&, Iterator p, std::size_t n) { BOOST_ASSERT(n == 1); (void)n; alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::forward(get(this->args_))... ); @@ -297,18 +297,18 @@ struct insert_emplace_proxy static const bool single_value = true; - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(BOOST_FWD_REF(Args)... args) + inline explicit insert_emplace_proxy(BOOST_FWD_REF(Args)... args) : base_t(::boost::forward(args)...) {} template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &a, Iterator p, std::size_t n) + inline void copy_n_and_update(Allocator &a, Iterator p, std::size_t n) { this->priv_copy_some_and_update(a, index_tuple_t(), p, n); } private: template - BOOST_CONTAINER_FORCEINLINE void priv_copy_some_and_update(Allocator &a, const index_tuple&, Iterator p, std::size_t n) + inline void priv_copy_some_and_update(Allocator &a, const index_tuple&, Iterator p, std::size_t n) { BOOST_ASSERT(n ==1); (void)n; typename dtl::aligned_storage::value>::type v; @@ -333,7 +333,7 @@ struct insert_emplace_proxy::value_type &&v) + inline explicit insert_emplace_proxy(typename boost::container::allocator_traits::value_type &&v) : insert_move_proxy(v) {} }; @@ -350,7 +350,7 @@ struct insert_emplace_proxy::value_type &v) + inline explicit insert_emplace_proxy(const typename boost::container::allocator_traits::value_type &v) : insert_copy_proxy(v) {} }; @@ -361,7 +361,7 @@ struct insert_emplace_proxy::value_type &v) + inline explicit insert_emplace_proxy(const typename boost::container::allocator_traits::value_type &v) : insert_copy_proxy(v) {} }; @@ -374,7 +374,7 @@ struct insert_emplace_proxy::value_type &v) + inline explicit insert_emplace_proxy(const typename boost::container::allocator_traits::value_type &v) : insert_copy_proxy(v) {} }; @@ -398,18 +398,18 @@ struct insert_nonmovable_emplace_proxy##N\ \ static const bool single_value = true;\ \ - BOOST_CONTAINER_FORCEINLINE explicit insert_nonmovable_emplace_proxy##N(BOOST_MOVE_UREF##N)\ + inline explicit insert_nonmovable_emplace_proxy##N(BOOST_MOVE_UREF##N)\ BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N {}\ \ template\ - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n)\ + inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n)\ {\ BOOST_ASSERT(n == 1); (void)n;\ alloc_traits::construct(a, boost::movelib::iterator_to_raw_pointer(p) BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\ }\ \ template\ - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator, std::size_t)\ + inline void copy_n_and_update(Allocator &, Iterator, std::size_t)\ { BOOST_ASSERT(false); }\ \ protected:\ @@ -427,11 +427,11 @@ struct insert_emplace_proxy_arg##N\ \ static const bool single_value = true;\ \ - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg##N(BOOST_MOVE_UREF##N)\ + inline explicit insert_emplace_proxy_arg##N(BOOST_MOVE_UREF##N)\ : base_t(BOOST_MOVE_FWD##N){}\ \ template\ - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &a, Iterator p, std::size_t n)\ + inline void copy_n_and_update(Allocator &a, Iterator p, std::size_t n)\ {\ BOOST_ASSERT(n == 1); (void)n;\ typename dtl::aligned_storage::value>::type v;\ @@ -461,7 +461,7 @@ struct insert_emplace_proxy_arg1::value_type &v) + inline explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits::value_type &v) : insert_move_proxy(v) {} }; @@ -472,7 +472,7 @@ struct insert_emplace_proxy_arg1::value_type &v) + inline explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) : insert_copy_proxy(v) {} }; @@ -486,7 +486,7 @@ struct insert_emplace_proxy_arg1::value_type &&v) + inline explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits::value_type &&v) : insert_move_proxy(v) {} }; @@ -502,7 +502,7 @@ struct insert_emplace_proxy_arg1::value_type &v) + inline explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) : insert_copy_proxy(v) {} }; @@ -513,7 +513,7 @@ struct insert_emplace_proxy_arg1::value_type &v) + inline explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) : insert_copy_proxy(v) {} }; @@ -526,7 +526,7 @@ struct insert_emplace_proxy_arg1::value_type &v) + inline explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) : insert_copy_proxy(v) {} }; diff --git a/include/boost/container/detail/alloc_helpers.hpp b/include/boost/container/detail/alloc_helpers.hpp index 5ca2ca7..57c59e4 100644 --- a/include/boost/container/detail/alloc_helpers.hpp +++ b/include/boost/container/detail/alloc_helpers.hpp @@ -27,30 +27,30 @@ namespace container { namespace dtl { template -BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type) +inline void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type) BOOST_NOEXCEPT_OR_NOTHROW {} template -BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type) +inline void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type) { boost::adl_move_swap(l, r); } template -BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type) +inline void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type) BOOST_NOEXCEPT_OR_NOTHROW {} template -BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type) +inline void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type) { l = r; } template -BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type) +inline void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type) BOOST_NOEXCEPT_OR_NOTHROW {} template -BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type) +inline void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type) { l = ::boost::move(r); } } //namespace dtl { diff --git a/include/boost/container/detail/allocator_version_traits.hpp b/include/boost/container/detail/allocator_version_traits.hpp index 391f466..4e83d21 100644 --- a/include/boost/container/detail/allocator_version_traits.hpp +++ b/include/boost/container/detail/allocator_version_traits.hpp @@ -46,19 +46,19 @@ struct allocator_version_traits typedef typename boost::container::allocator_traits::size_type size_type; //Node allocation interface - BOOST_CONTAINER_FORCEINLINE static pointer allocate_one(Allocator &a) + inline static pointer allocate_one(Allocator &a) { return a.allocate_one(); } - BOOST_CONTAINER_FORCEINLINE static void deallocate_one(Allocator &a, const pointer &p) + inline static void deallocate_one(Allocator &a, const pointer &p) { a.deallocate_one(p); } - BOOST_CONTAINER_FORCEINLINE static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m) + inline static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m) { return a.allocate_individual(n, m); } - BOOST_CONTAINER_FORCEINLINE static void deallocate_individual(Allocator &a, multiallocation_chain &holder) + inline static void deallocate_individual(Allocator &a, multiallocation_chain &holder) { a.deallocate_individual(holder); } - BOOST_CONTAINER_FORCEINLINE static pointer allocation_command(Allocator &a, allocation_type command, + inline static pointer allocation_command(Allocator &a, allocation_type command, size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse) { return a.allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); } }; @@ -82,10 +82,10 @@ struct allocator_version_traits < multialloc_cached_counted, value_type> multiallocation_chain; //Node allocation interface - BOOST_CONTAINER_FORCEINLINE static pointer allocate_one(Allocator &a) + inline static pointer allocate_one(Allocator &a) { return a.allocate(1); } - BOOST_CONTAINER_FORCEINLINE static void deallocate_one(Allocator &a, const pointer &p) + inline static void deallocate_one(Allocator &a, const pointer &p) { a.deallocate(p, 1); } static void deallocate_individual(Allocator &a, multiallocation_chain &holder) @@ -102,17 +102,17 @@ struct allocator_version_traits struct allocate_individual_rollback { - BOOST_CONTAINER_FORCEINLINE allocate_individual_rollback(Allocator &a, multiallocation_chain &chain) + inline allocate_individual_rollback(Allocator &a, multiallocation_chain &chain) : mr_a(a), mp_chain(&chain) {} - BOOST_CONTAINER_FORCEINLINE ~allocate_individual_rollback() + inline ~allocate_individual_rollback() { if(mp_chain) allocator_version_traits::deallocate_individual(mr_a, *mp_chain); } - BOOST_CONTAINER_FORCEINLINE void release() + inline void release() { mp_chain = 0; } diff --git a/include/boost/container/detail/compare_functors.hpp b/include/boost/container/detail/compare_functors.hpp index ae4ffce..9a35274 100644 --- a/include/boost/container/detail/compare_functors.hpp +++ b/include/boost/container/detail/compare_functors.hpp @@ -32,11 +32,11 @@ class equal_to_value const value_type &t_; public: - BOOST_CONTAINER_FORCEINLINE explicit equal_to_value(const value_type &t) + inline explicit equal_to_value(const value_type &t) : t_(t) {} - BOOST_CONTAINER_FORCEINLINE bool operator()(const value_type &t)const + inline bool operator()(const value_type &t)const { return t_ == t; } }; @@ -47,39 +47,39 @@ struct value_to_node_compare typedef Pred predicate_type; typedef Node node_type; - BOOST_CONTAINER_FORCEINLINE value_to_node_compare() + inline value_to_node_compare() : Pred() {} - BOOST_CONTAINER_FORCEINLINE explicit value_to_node_compare(Pred pred) + inline explicit value_to_node_compare(Pred pred) : Pred(pred) {} - BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a, const Node &b) const + inline Ret operator()(const Node &a, const Node &b) const { return static_cast(*this)(a.get_data(), b.get_data()); } - BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a) const + inline Ret operator()(const Node &a) const { return static_cast(*this)(a.get_data()); } - BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a, const Node &b) + inline Ret operator()(const Node &a, const Node &b) { return static_cast(*this)(a.get_data(), b.get_data()); } - BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a) + inline Ret operator()(const Node &a) { return static_cast(*this)(a.get_data()); } - BOOST_CONTAINER_FORCEINLINE predicate_type & predicate() { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE const predicate_type & predicate() const { return static_cast(*this); } + inline predicate_type & predicate() { return static_cast(*this); } + inline const predicate_type & predicate() const { return static_cast(*this); } }; template struct key_node_pred : public boost::intrusive::detail::ebo_functor_holder { - BOOST_CONTAINER_FORCEINLINE explicit key_node_pred(const KeyPred &comp) + inline explicit key_node_pred(const KeyPred &comp) : base_t(comp) {} - BOOST_CONTAINER_FORCEINLINE explicit key_node_pred() + inline explicit key_node_pred() {} typedef boost::intrusive::detail::ebo_functor_holder base_t; @@ -88,42 +88,42 @@ struct key_node_pred typedef typename KeyOfValue::type key_type; - BOOST_CONTAINER_FORCEINLINE static const key_type &key_from(const Node &n) + inline static const key_type &key_from(const Node &n) { return key_of_value()(n.get_data()); } template - BOOST_CONTAINER_FORCEINLINE static const T & + inline static const T & key_from(const T &t) { return t; } - BOOST_CONTAINER_FORCEINLINE const key_predicate &key_pred() const + inline const key_predicate &key_pred() const { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE key_predicate &key_pred() + inline key_predicate &key_pred() { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE Ret operator()(const key_type &key) const + inline Ret operator()(const key_type &key) const { return this->key_pred()(key); } template - BOOST_CONTAINER_FORCEINLINE Ret operator()(const U &nonkey) const + inline Ret operator()(const U &nonkey) const { return this->key_pred()(this->key_from(nonkey)); } - BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const + inline bool operator()(const key_type &key1, const key_type &key2) const { return this->key_pred()(key1, key2); } template - BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const + inline bool operator()(const key_type &key1, const U &nonkey2) const { return this->key_pred()(key1, this->key_from(nonkey2)); } template - BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const + inline bool operator()(const U &nonkey1, const key_type &key2) const { return this->key_pred()(this->key_from(nonkey1), key2); } template - BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const + inline bool operator()(const U &nonkey1, const V &nonkey2) const { return this->key_pred()(this->key_from(nonkey1), this->key_from(nonkey2)); } }; diff --git a/include/boost/container/detail/copy_move_algo.hpp b/include/boost/container/detail/copy_move_algo.hpp index 8729b30..105faf6 100644 --- a/include/boost/container/detail/copy_move_algo.hpp +++ b/include/boost/container/detail/copy_move_algo.hpp @@ -46,7 +46,12 @@ # endif //GCC 8 seems a bit confused about array access error with static_vector //when out of bound exceptions are being thrown. -# if defined(BOOST_GCC) && (BOOST_GCC >= 80000) && (BOOST_GCC < 80200) +# if defined(BOOST_GCC) && ((BOOST_GCC >= 80000) && (BOOST_GCC < 80200)) +# pragma GCC diagnostic ignored "-Wstringop-overflow" +# endif +//GCC 12 seems a bit confused about array access error with small_vector +# if defined(BOOST_GCC) && ((BOOST_GCC >= 120000) && (BOOST_GCC < 130000)) +# pragma GCC diagnostic ignored "-Wstringop-overread" # pragma GCC diagnostic ignored "-Wstringop-overflow" # endif # pragma GCC diagnostic ignored "-Warray-bounds" @@ -214,7 +219,7 @@ struct disable_if_single_value_proxy template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE F memmove(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW +inline F memmove(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW { typedef typename boost::container::iter_value::type value_type; typedef typename boost::container::iterator_traits::difference_type r_difference_type; @@ -232,7 +237,7 @@ BOOST_CONTAINER_FORCEINLINE F memmove(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE F memmove_n(I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW +inline F memmove_n(I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW { typedef typename boost::container::iter_value::type value_type; typedef typename boost::container::iterator_traits::difference_type r_difference_type; @@ -250,7 +255,7 @@ BOOST_CONTAINER_FORCEINLINE F memmove_n(I f, std::size_t n, F r) BOOST_NOEXCEPT_ template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE I memmove_n_source(I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW +inline I memmove_n_source(I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW { if(BOOST_LIKELY(n != 0)){ typedef typename boost::container::iter_value::type value_type; @@ -267,7 +272,7 @@ BOOST_CONTAINER_FORCEINLINE I memmove_n_source(I f, std::size_t n, F r) BOOST_NO template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE I memmove_n_source_dest(I f, std::size_t n, F &r) BOOST_NOEXCEPT_OR_NOTHROW +inline I memmove_n_source_dest(I f, std::size_t n, F &r) BOOST_NOEXCEPT_OR_NOTHROW { typedef typename boost::container::iter_value::type value_type; typedef typename boost::container::iterator_traits::difference_type i_difference_type; @@ -367,7 +372,7 @@ template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_constructible::type +inline typename dtl::enable_if_memtransfer_copy_constructible::type uninitialized_move_alloc(Allocator &, I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::memmove(f, l, r); } @@ -413,7 +418,7 @@ template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_constructible::type +inline typename dtl::enable_if_memtransfer_copy_constructible::type uninitialized_move_alloc_n(Allocator &, I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::memmove_n(f, n, r); } @@ -459,7 +464,7 @@ template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_constructible::type +inline typename dtl::enable_if_memtransfer_copy_constructible::type uninitialized_move_alloc_n_source(Allocator &, I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::memmove_n_source(f, n, r); } @@ -504,7 +509,7 @@ template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_constructible::type +inline typename dtl::enable_if_memtransfer_copy_constructible::type uninitialized_copy_alloc(Allocator &, I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::memmove(f, l, r); } @@ -550,7 +555,7 @@ template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_constructible::type +inline typename dtl::enable_if_memtransfer_copy_constructible::type uninitialized_copy_alloc_n(Allocator &, I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::memmove_n(f, n, r); } @@ -595,7 +600,7 @@ template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_constructible::type +inline typename dtl::enable_if_memtransfer_copy_constructible::type uninitialized_copy_alloc_n_source(Allocator &, I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::memmove_n_source(f, n, r); } @@ -639,7 +644,7 @@ inline typename dtl::disable_if_memzero_initializable::type template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memzero_initializable::type +inline typename dtl::enable_if_memzero_initializable::type uninitialized_value_init_alloc_n(Allocator &, std::size_t n, F r) { typedef typename boost::container::iterator_traits::value_type value_type; @@ -812,7 +817,7 @@ template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_assignable::type +inline typename dtl::enable_if_memtransfer_copy_assignable::type copy_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::memmove_n(f, n, r); } @@ -840,7 +845,7 @@ inline typename dtl::disable_if_memtransfer_copy_assignable::type template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_assignable::type +inline typename dtl::enable_if_memtransfer_copy_assignable::type copy_n_source(I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::memmove_n_source(f, n, r); } @@ -867,7 +872,7 @@ inline typename dtl::disable_if_memtransfer_copy_assignable::type template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_assignable::type +inline typename dtl::enable_if_memtransfer_copy_assignable::type copy_n_source_dest(I f, std::size_t n, F &r) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::memmove_n_source_dest(f, n, r); } @@ -922,7 +927,7 @@ template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_assignable::type +inline typename dtl::enable_if_memtransfer_copy_assignable::type move_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::memmove_n(f, n, r); } @@ -949,7 +954,7 @@ inline typename dtl::disable_if_memtransfer_copy_assignable::type template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_assignable::type +inline typename dtl::enable_if_memtransfer_copy_assignable::type move_backward(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW { typedef typename boost::container::iter_value::type value_type; @@ -985,7 +990,7 @@ inline typename dtl::disable_if_memtransfer_copy_assignable::type template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_assignable::type +inline typename dtl::enable_if_memtransfer_copy_assignable::type move_n_source_dest(I f, std::size_t n, F &r) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::memmove_n_source_dest(f, n, r); } @@ -1013,18 +1018,18 @@ inline typename dtl::disable_if_memtransfer_copy_assignable::type template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memtransfer_copy_assignable::type +inline typename dtl::enable_if_memtransfer_copy_assignable::type move_n_source(I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::memmove_n_source(f, n, r); } template // F models ForwardIterator -BOOST_CONTAINER_FORCEINLINE F move_forward_overlapping(F f, F l, F r) +inline F move_forward_overlapping(F f, F l, F r) { return (f != r) ? (move)(f, l, r) : l; } template // B models BidirIterator -BOOST_CONTAINER_FORCEINLINE B move_backward_overlapping(B f, B l, B rl) +inline B move_backward_overlapping(B f, B l, B rl) { return (l != rl) ? (move_backward)(f, l, rl) : f; } @@ -1054,7 +1059,7 @@ template // U models unsigned integral constant -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_trivially_destructible::type +inline typename dtl::enable_if_trivially_destructible::type destroy_alloc_n(Allocator &, I, U) {} @@ -1079,7 +1084,7 @@ inline typename dtl::disable_if_trivially_destructible::type template // I models InputIterator -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_trivially_destructible::type +inline typename dtl::enable_if_trivially_destructible::type destroy_alloc(Allocator &, I, I) {} @@ -1458,7 +1463,7 @@ template , typename F // F models ForwardIterator , typename InsertionProxy > -BOOST_CONTAINER_FORCEINLINE void expand_forward_and_insert_alloc +inline void expand_forward_and_insert_alloc ( Allocator& a , F pos , F last @@ -1780,7 +1785,7 @@ template , typename B // B models BidirIterator , typename InsertionProxy > -BOOST_CONTAINER_FORCEINLINE void expand_backward_forward_and_insert_alloc_move_forward +inline void expand_backward_forward_and_insert_alloc_move_forward ( B const old_start , std::size_t const old_size , B const new_start diff --git a/include/boost/container/detail/destroyers.hpp b/include/boost/container/detail/destroyers.hpp index f00ac6d..38ff874 100644 --- a/include/boost/container/detail/destroyers.hpp +++ b/include/boost/container/detail/destroyers.hpp @@ -180,23 +180,23 @@ struct scoped_destructor_n typedef Ptr pointer; typedef typename AllocTraits::value_type value_type; - BOOST_CONTAINER_FORCEINLINE scoped_destructor_n(Ptr p, Allocator& a, std::size_t n) + inline scoped_destructor_n(Ptr p, Allocator& a, std::size_t n) : m_p(p), m_n(n), m_a(a) {} - BOOST_CONTAINER_FORCEINLINE void release() + inline void release() { m_p = Ptr(); m_n = 0; } - BOOST_CONTAINER_FORCEINLINE void increment_size(std::size_t inc) + inline void increment_size(std::size_t inc) { m_n += inc; } - BOOST_CONTAINER_FORCEINLINE void increment_size_backwards(std::size_t inc) + inline void increment_size_backwards(std::size_t inc) { m_n += inc; m_p -= std::ptrdiff_t(inc); } - BOOST_CONTAINER_FORCEINLINE void shrink_forward(std::size_t inc) + inline void shrink_forward(std::size_t inc) { m_n -= inc; m_p += std::ptrdiff_t(inc); } - BOOST_CONTAINER_FORCEINLINE void set_size(std::size_t sz) + inline void set_size(std::size_t sz) { m_n = sz; } ~scoped_destructor_n() @@ -225,22 +225,22 @@ struct null_scoped_destructor_n typedef boost::container::allocator_traits AllocTraits; typedef Ptr pointer; - BOOST_CONTAINER_FORCEINLINE null_scoped_destructor_n(Ptr, Allocator&, std::size_t) + inline null_scoped_destructor_n(Ptr, Allocator&, std::size_t) {} - BOOST_CONTAINER_FORCEINLINE void increment_size(std::size_t) + inline void increment_size(std::size_t) {} - BOOST_CONTAINER_FORCEINLINE void increment_size_backwards(std::size_t) + inline void increment_size_backwards(std::size_t) {} - BOOST_CONTAINER_FORCEINLINE void set_size(std::size_t ) + inline void set_size(std::size_t ) {} - BOOST_CONTAINER_FORCEINLINE void shrink_forward(std::size_t) + inline void shrink_forward(std::size_t) {} - BOOST_CONTAINER_FORCEINLINE void release() + inline void release() {} }; @@ -254,20 +254,20 @@ struct scoped_destructor_range typedef typename AllocTraits::pointer pointer; typedef typename AllocTraits::value_type value_type; - BOOST_CONTAINER_FORCEINLINE scoped_destructor_range(pointer p, pointer e, Allocator& a) + inline scoped_destructor_range(pointer p, pointer e, Allocator& a) : m_p(p), m_e(e), m_a(a) {} - BOOST_CONTAINER_FORCEINLINE void release() + inline void release() { m_p = pointer(); m_e = pointer(); } - BOOST_CONTAINER_FORCEINLINE void set_end(pointer e) + inline void set_end(pointer e) { m_e = e; } - BOOST_CONTAINER_FORCEINLINE void set_begin(pointer b) + inline void set_begin(pointer b) { m_p = b; } - BOOST_CONTAINER_FORCEINLINE void set_range(pointer b, pointer e) + inline void set_range(pointer b, pointer e) { m_p = b; m_e = e; } ~scoped_destructor_range() @@ -293,19 +293,19 @@ struct null_scoped_destructor_range typedef boost::container::allocator_traits AllocTraits; typedef typename AllocTraits::pointer pointer; - BOOST_CONTAINER_FORCEINLINE null_scoped_destructor_range(pointer, pointer, Allocator&) + inline null_scoped_destructor_range(pointer, pointer, Allocator&) {} - BOOST_CONTAINER_FORCEINLINE void release() + inline void release() {} - BOOST_CONTAINER_FORCEINLINE void set_end(pointer) + inline void set_end(pointer) {} - BOOST_CONTAINER_FORCEINLINE void set_begin(pointer) + inline void set_begin(pointer) {} - BOOST_CONTAINER_FORCEINLINE void set_range(pointer, pointer) + inline void set_range(pointer, pointer) {} }; @@ -316,24 +316,24 @@ class scoped_destructor typedef boost::container::allocator_traits AllocTraits; public: typedef typename Allocator::value_type value_type; - BOOST_CONTAINER_FORCEINLINE scoped_destructor(Allocator &a, value_type *pv) + inline scoped_destructor(Allocator &a, value_type *pv) : pv_(pv), a_(a) {} - BOOST_CONTAINER_FORCEINLINE ~scoped_destructor() + inline ~scoped_destructor() { if(pv_){ AllocTraits::destroy(a_, pv_); } } - BOOST_CONTAINER_FORCEINLINE void release() + inline void release() { pv_ = 0; } - BOOST_CONTAINER_FORCEINLINE void set(value_type *ptr) { pv_ = ptr; } + inline void set(value_type *ptr) { pv_ = ptr; } - BOOST_CONTAINER_FORCEINLINE value_type *get() const { return pv_; } + inline value_type *get() const { return pv_; } private: value_type *pv_; @@ -346,18 +346,18 @@ class null_scoped_destructor typedef boost::container::allocator_traits AllocTraits; public: typedef typename Allocator::value_type value_type; - BOOST_CONTAINER_FORCEINLINE null_scoped_destructor(Allocator &, value_type *) + inline null_scoped_destructor(Allocator &, value_type *) {} - BOOST_CONTAINER_FORCEINLINE ~null_scoped_destructor() + inline ~null_scoped_destructor() {} - BOOST_CONTAINER_FORCEINLINE void release() + inline void release() {} - BOOST_CONTAINER_FORCEINLINE void set(value_type *) { } + inline void set(value_type *) { } - BOOST_CONTAINER_FORCEINLINE value_type *get() const { return 0; } + inline value_type *get() const { return 0; } }; @@ -368,11 +368,11 @@ class value_destructor typedef boost::container::allocator_traits AllocTraits; public: typedef Value value_type; - BOOST_CONTAINER_FORCEINLINE value_destructor(Allocator &a, value_type &rv) + inline value_destructor(Allocator &a, value_type &rv) : rv_(rv), a_(a) {} - BOOST_CONTAINER_FORCEINLINE ~value_destructor() + inline ~value_destructor() { AllocTraits::destroy(a_, &rv_); } @@ -396,18 +396,18 @@ class allocator_node_destroyer Allocator & a_; private: - BOOST_CONTAINER_FORCEINLINE void priv_deallocate(const pointer &p, version_1) + inline void priv_deallocate(const pointer &p, version_1) { AllocTraits::deallocate(a_,p, 1); } - BOOST_CONTAINER_FORCEINLINE void priv_deallocate(const pointer &p, version_2) + inline void priv_deallocate(const pointer &p, version_2) { a_.deallocate_one(p); } public: - BOOST_CONTAINER_FORCEINLINE explicit allocator_node_destroyer(Allocator &a) + inline explicit allocator_node_destroyer(Allocator &a) : a_(a) {} - BOOST_CONTAINER_FORCEINLINE void operator()(const pointer &p) + inline void operator()(const pointer &p) { boost::movelib::to_raw_pointer(p)->destructor(a_); this->priv_deallocate(p, alloc_version()); @@ -420,24 +420,24 @@ class scoped_node_destructor typedef boost::container::allocator_traits AllocTraits; public: typedef typename Allocator::value_type value_type; - BOOST_CONTAINER_FORCEINLINE scoped_node_destructor(Allocator &a, value_type *pv) + inline scoped_node_destructor(Allocator &a, value_type *pv) : pv_(pv), a_(a) {} - BOOST_CONTAINER_FORCEINLINE ~scoped_node_destructor() + inline ~scoped_node_destructor() { if(pv_){ pv_->destructor(a_); } } - BOOST_CONTAINER_FORCEINLINE void release() + inline void release() { pv_ = 0; } - BOOST_CONTAINER_FORCEINLINE void set(value_type *ptr) { pv_ = ptr; } + inline void set(value_type *ptr) { pv_ = ptr; } - BOOST_CONTAINER_FORCEINLINE value_type *get() const { return pv_; } + inline value_type *get() const { return pv_; } private: value_type *pv_; @@ -457,11 +457,11 @@ class allocator_node_destroyer_and_chain_builder multiallocation_chain &c_; public: - BOOST_CONTAINER_FORCEINLINE allocator_node_destroyer_and_chain_builder(Allocator &a, multiallocation_chain &c) + inline allocator_node_destroyer_and_chain_builder(Allocator &a, multiallocation_chain &c) : a_(a), c_(c) {} - BOOST_CONTAINER_FORCEINLINE void operator()(const typename Allocator::pointer &p) + inline void operator()(const typename Allocator::pointer &p) { boost::movelib::to_raw_pointer(p)->destructor(a_); c_.push_back(p); @@ -480,14 +480,14 @@ class allocator_multialloc_chain_node_deallocator multiallocation_chain c_; public: - BOOST_CONTAINER_FORCEINLINE allocator_multialloc_chain_node_deallocator(Allocator &a) + inline allocator_multialloc_chain_node_deallocator(Allocator &a) : a_(a), c_() {} - BOOST_CONTAINER_FORCEINLINE chain_builder get_chain_builder() + inline chain_builder get_chain_builder() { return chain_builder(a_, c_); } - BOOST_CONTAINER_FORCEINLINE ~allocator_multialloc_chain_node_deallocator() + inline ~allocator_multialloc_chain_node_deallocator() { a_.deallocate_individual(c_); } diff --git a/include/boost/container/detail/dispatch_uses_allocator.hpp b/include/boost/container/detail/dispatch_uses_allocator.hpp index 42fd4f4..5bb7687 100644 --- a/include/boost/container/detail/dispatch_uses_allocator.hpp +++ b/include/boost/container/detail/dispatch_uses_allocator.hpp @@ -110,7 +110,7 @@ template < typename ConstructAlloc , typename T , class ...Args > -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and +inline typename dtl::enable_if_and < void , dtl::is_not_pair , dtl::not_< uses_allocator::type > > @@ -127,7 +127,7 @@ template < typename ConstructAlloc , typename T , class ...Args > -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and +inline typename dtl::enable_if_and < void , dtl::is_not_pair , uses_allocator::type> @@ -146,7 +146,7 @@ template < typename ConstructAlloc , typename T , class ...Args > -BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and +inline typename dtl::enable_if_and < void , dtl::is_not_pair , uses_allocator::type> @@ -162,7 +162,7 @@ BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and #define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \ template \ - BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and\ + inline typename dtl::enable_if_and\ < void\ , dtl::is_not_pair\ , dtl::not_::type> >\ @@ -179,7 +179,7 @@ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR #define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \ template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ - BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and\ + inline typename dtl::enable_if_and\ < void\ , dtl::is_not_pair\ , uses_allocator::type>\ @@ -197,7 +197,7 @@ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR #define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \ template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ - BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and\ + inline typename dtl::enable_if_and\ < void\ , dtl::is_not_pair\ , uses_allocator::type>\ diff --git a/include/boost/container/detail/flat_tree.hpp b/include/boost/container/detail/flat_tree.hpp index 91b11bc..5a14826 100644 --- a/include/boost/container/detail/flat_tree.hpp +++ b/include/boost/container/detail/flat_tree.hpp @@ -135,7 +135,7 @@ BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(stored_allocator_type) // /////////////////////////////////////// template -BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_merge //is_contiguous_container == true +inline void flat_tree_container_inplace_merge //is_contiguous_container == true (SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp , dtl::true_) { typedef typename SequenceContainer::value_type value_type; @@ -149,7 +149,7 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_merge //is_contiguo } template -BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_merge //is_contiguous_container == false +inline void flat_tree_container_inplace_merge //is_contiguous_container == false (SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp, dtl::false_) { boost::movelib::adaptive_merge(dest.begin(), it, dest.end(), comp); @@ -161,7 +161,7 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_merge //is_contiguo // /////////////////////////////////////// template -BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_sort_ending //is_contiguous_container == true +inline void flat_tree_container_inplace_sort_ending //is_contiguous_container == true (SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp, dtl::true_) { typedef typename SequenceContainer::value_type value_type; @@ -176,7 +176,7 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_sort_ending //is_co } template -BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_sort_ending //is_contiguous_container == false +inline void flat_tree_container_inplace_sort_ending //is_contiguous_container == false (SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp , dtl::false_) { boost::movelib::adaptive_sort(it, dest.end(), comp); @@ -188,14 +188,14 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_sort_ending //is_co // /////////////////////////////////////// template -BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_equal +inline void flat_tree_merge_equal (SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::true_) { dest.merge(first, last, comp); } template -BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_equal //has_merge_unique == false +inline void flat_tree_merge_equal //has_merge_unique == false (SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::false_) { if(first != last) { @@ -212,14 +212,14 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_equal //has_merge_unique == f // /////////////////////////////////////// template -BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_unique //has_merge_unique == true +inline void flat_tree_merge_unique //has_merge_unique == true (SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::true_) { dest.merge_unique(first, last, comp); } template -BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_unique //has_merge_unique == false +inline void flat_tree_merge_unique //has_merge_unique == false (SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::false_) { if (first != last) { @@ -242,7 +242,7 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_unique //has_merge_unique == f // /////////////////////////////////////// template -BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type +inline typename SequenceContainer::size_type flat_tree_index_of // has_index_of == true (SequenceContainer& cont, Iterator p, dtl::true_) { @@ -250,7 +250,7 @@ BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type } template -BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type +inline typename SequenceContainer::size_type flat_tree_index_of // has_index_of == false (SequenceContainer& cont, Iterator p, dtl::false_) { @@ -264,7 +264,7 @@ BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type // /////////////////////////////////////// template -BOOST_CONTAINER_FORCEINLINE Iterator +inline Iterator flat_tree_nth // has_nth == true (SequenceContainer& cont, typename SequenceContainer::size_type n, dtl::true_) { @@ -272,7 +272,7 @@ BOOST_CONTAINER_FORCEINLINE Iterator } template -BOOST_CONTAINER_FORCEINLINE Iterator +inline Iterator flat_tree_nth // has_nth == false (SequenceContainer& cont, typename SequenceContainer::size_type n, dtl::false_) { @@ -285,7 +285,7 @@ BOOST_CONTAINER_FORCEINLINE Iterator // /////////////////////////////////////// template -BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::stored_allocator_type & +inline typename SequenceContainer::stored_allocator_type & flat_tree_get_stored_allocator // has_get_stored_allocator == true (SequenceContainer& cont, dtl::true_) { @@ -293,7 +293,7 @@ BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::stored_allocator_type & } template -BOOST_CONTAINER_FORCEINLINE const typename SequenceContainer::stored_allocator_type & +inline const typename SequenceContainer::stored_allocator_type & flat_tree_get_stored_allocator // has_get_stored_allocator == true (const SequenceContainer& cont, dtl::true_) { @@ -301,7 +301,7 @@ BOOST_CONTAINER_FORCEINLINE const typename SequenceContainer::stored_allocator_t } template -BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::allocator_type +inline typename SequenceContainer::allocator_type flat_tree_get_stored_allocator // has_get_stored_allocator == false (SequenceContainer& cont, dtl::false_) { @@ -337,7 +337,7 @@ void flat_tree_sort_contiguous_to_adopt // is_contiguous_container == true } template -BOOST_CONTAINER_FORCEINLINE void flat_tree_adopt_sequence_equal // is_contiguous_container == true +inline void flat_tree_adopt_sequence_equal // is_contiguous_container == true (SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp, dtl::true_) { flat_tree_sort_contiguous_to_adopt(tseq, boost::move(seq), comp); @@ -345,7 +345,7 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_adopt_sequence_equal // is_contiguous } template -BOOST_CONTAINER_FORCEINLINE void flat_tree_adopt_sequence_equal // is_contiguous_container == false +inline void flat_tree_adopt_sequence_equal // is_contiguous_container == false (SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp, dtl::false_) { boost::movelib::adaptive_sort(seq.begin(), seq.end(), comp); @@ -386,14 +386,14 @@ void flat_tree_adopt_sequence_unique// is_contiguous_container == false // /////////////////////////////////////// template -BOOST_CONTAINER_FORCEINLINE void // has_reserve == true +inline void // has_reserve == true flat_tree_reserve(SequenceContainer &tseq, typename SequenceContainer::size_type cap, dtl::true_) { tseq.reserve(cap); } template -BOOST_CONTAINER_FORCEINLINE void // has_reserve == false +inline void // has_reserve == false flat_tree_reserve(SequenceContainer &, typename SequenceContainer::size_type, dtl::false_) { } @@ -404,14 +404,14 @@ BOOST_CONTAINER_FORCEINLINE void // has_reserve == false // /////////////////////////////////////// template // has_capacity == true -BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type +inline typename SequenceContainer::size_type flat_tree_capacity(const SequenceContainer &tseq, dtl::true_) { return tseq.capacity(); } template // has_capacity == false -BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type +inline typename SequenceContainer::size_type flat_tree_capacity(const SequenceContainer &tseq, dtl::false_) { return tseq.size(); @@ -431,24 +431,24 @@ class flat_tree_value_compare typedef Value second_argument_type; typedef bool return_type; public: - BOOST_CONTAINER_FORCEINLINE flat_tree_value_compare() + inline flat_tree_value_compare() : Compare() {} - BOOST_CONTAINER_FORCEINLINE flat_tree_value_compare(const Compare &pred) + inline flat_tree_value_compare(const Compare &pred) : Compare(pred) {} - BOOST_CONTAINER_FORCEINLINE bool operator()(const Value& lhs, const Value& rhs) const + inline bool operator()(const Value& lhs, const Value& rhs) const { KeyOfValue key_extract; return Compare::operator()(key_extract(lhs), key_extract(rhs)); } - BOOST_CONTAINER_FORCEINLINE const Compare &get_comp() const + inline const Compare &get_comp() const { return *this; } - BOOST_CONTAINER_FORCEINLINE Compare &get_comp() + inline Compare &get_comp() { return *this; } }; @@ -502,35 +502,35 @@ class flat_tree BOOST_COPYABLE_AND_MOVABLE(Data) public: - BOOST_CONTAINER_FORCEINLINE Data() + inline Data() : value_compare(), m_seq() {} - BOOST_CONTAINER_FORCEINLINE explicit Data(const allocator_t &alloc) + inline explicit Data(const allocator_t &alloc) : value_compare(), m_seq(alloc) {} - BOOST_CONTAINER_FORCEINLINE explicit Data(const Compare &comp) + inline explicit Data(const Compare &comp) : value_compare(comp), m_seq() {} - BOOST_CONTAINER_FORCEINLINE Data(const Compare &comp, const allocator_t &alloc) + inline Data(const Compare &comp, const allocator_t &alloc) : value_compare(comp), m_seq(alloc) {} - BOOST_CONTAINER_FORCEINLINE explicit Data(const Data &d) + inline explicit Data(const Data &d) : value_compare(static_cast(d)), m_seq(d.m_seq) {} - BOOST_CONTAINER_FORCEINLINE Data(BOOST_RV_REF(Data) d) + inline Data(BOOST_RV_REF(Data) d) : value_compare(boost::move(static_cast(d))), m_seq(boost::move(d.m_seq)) {} - BOOST_CONTAINER_FORCEINLINE Data(const Data &d, const allocator_t &a) + inline Data(const Data &d, const allocator_t &a) : value_compare(static_cast(d)), m_seq(d.m_seq, a) {} - BOOST_CONTAINER_FORCEINLINE Data(BOOST_RV_REF(Data) d, const allocator_t &a) + inline Data(BOOST_RV_REF(Data) d, const allocator_t &a) : value_compare(boost::move(static_cast(d))), m_seq(boost::move(d.m_seq), a) {} @@ -596,41 +596,41 @@ class flat_tree typedef typename dtl::if_c ::type get_stored_allocator_noconst_return_t; - BOOST_CONTAINER_FORCEINLINE flat_tree() + inline flat_tree() : m_data() { } - BOOST_CONTAINER_FORCEINLINE explicit flat_tree(const Compare& comp) + inline explicit flat_tree(const Compare& comp) : m_data(comp) { } - BOOST_CONTAINER_FORCEINLINE explicit flat_tree(const allocator_type& a) + inline explicit flat_tree(const allocator_type& a) : m_data(a) { } - BOOST_CONTAINER_FORCEINLINE flat_tree(const Compare& comp, const allocator_type& a) + inline flat_tree(const Compare& comp, const allocator_type& a) : m_data(comp, a) { } - BOOST_CONTAINER_FORCEINLINE flat_tree(const flat_tree& x) + inline flat_tree(const flat_tree& x) : m_data(x.m_data) { } - BOOST_CONTAINER_FORCEINLINE flat_tree(BOOST_RV_REF(flat_tree) x) + inline flat_tree(BOOST_RV_REF(flat_tree) x) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : m_data(boost::move(x.m_data)) { } - BOOST_CONTAINER_FORCEINLINE flat_tree(const flat_tree& x, const allocator_type &a) + inline flat_tree(const flat_tree& x, const allocator_type &a) : m_data(x.m_data, a) { } - BOOST_CONTAINER_FORCEINLINE flat_tree(BOOST_RV_REF(flat_tree) x, const allocator_type &a) + inline flat_tree(BOOST_RV_REF(flat_tree) x, const allocator_type &a) : m_data(boost::move(x.m_data), a) { } template - BOOST_CONTAINER_FORCEINLINE + inline flat_tree( ordered_range_t, InputIterator first, InputIterator last) : m_data() { @@ -639,7 +639,7 @@ class flat_tree } template - BOOST_CONTAINER_FORCEINLINE + inline flat_tree( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) : m_data(comp) { @@ -648,7 +648,7 @@ class flat_tree } template - BOOST_CONTAINER_FORCEINLINE + inline flat_tree( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : m_data(comp, a) { @@ -657,7 +657,7 @@ class flat_tree } template - BOOST_CONTAINER_FORCEINLINE + inline flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last) : m_data() { @@ -666,7 +666,7 @@ class flat_tree } template - BOOST_CONTAINER_FORCEINLINE + inline flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp) : m_data(comp) { @@ -675,7 +675,7 @@ class flat_tree } template - BOOST_CONTAINER_FORCEINLINE + inline flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : m_data(comp, a) { @@ -684,7 +684,7 @@ class flat_tree } template - BOOST_CONTAINER_FORCEINLINE + inline flat_tree( bool unique_insertion, InputIterator first, InputIterator last) : m_data() { @@ -692,7 +692,7 @@ class flat_tree } template - BOOST_CONTAINER_FORCEINLINE + inline flat_tree( bool unique_insertion, InputIterator first, InputIterator last , const Compare& comp) : m_data(comp) @@ -701,7 +701,7 @@ class flat_tree } template - BOOST_CONTAINER_FORCEINLINE + inline flat_tree( bool unique_insertion, InputIterator first, InputIterator last , const allocator_type& a) : m_data(a) @@ -710,7 +710,7 @@ class flat_tree } template - BOOST_CONTAINER_FORCEINLINE + inline flat_tree( bool unique_insertion, InputIterator first, InputIterator last , const Compare& comp, const allocator_type& a) : m_data(comp, a) @@ -718,28 +718,28 @@ class flat_tree this->priv_range_insertion_construct(unique_insertion, first, last); } - BOOST_CONTAINER_FORCEINLINE ~flat_tree() + inline ~flat_tree() {} - BOOST_CONTAINER_FORCEINLINE flat_tree& operator=(BOOST_COPY_ASSIGN_REF(flat_tree) x) + inline flat_tree& operator=(BOOST_COPY_ASSIGN_REF(flat_tree) x) { m_data = x.m_data; return *this; } - BOOST_CONTAINER_FORCEINLINE flat_tree& operator=(BOOST_RV_REF(flat_tree) x) + inline flat_tree& operator=(BOOST_RV_REF(flat_tree) x) BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || allocator_traits_type::is_always_equal::value) && boost::container::dtl::is_nothrow_move_assignable::value) { m_data = boost::move(x.m_data); return *this; } - BOOST_CONTAINER_FORCEINLINE const value_compare &priv_value_comp() const + inline const value_compare &priv_value_comp() const { return static_cast(this->m_data); } - BOOST_CONTAINER_FORCEINLINE value_compare &priv_value_comp() + inline value_compare &priv_value_comp() { return static_cast(this->m_data); } - BOOST_CONTAINER_FORCEINLINE const key_compare &priv_key_comp() const + inline const key_compare &priv_key_comp() const { return this->priv_value_comp().get_comp(); } - BOOST_CONTAINER_FORCEINLINE key_compare &priv_key_comp() + inline key_compare &priv_key_comp() { return this->priv_value_comp().get_comp(); } struct insert_commit_data @@ -749,91 +749,91 @@ class flat_tree public: // accessors: - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline Compare key_comp() const { return this->m_data.get_comp(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline value_compare value_comp() const { return this->m_data; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline allocator_type get_allocator() const { return this->m_data.m_seq.get_allocator(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline get_stored_allocator_const_return_t get_stored_allocator() const { return flat_tree_get_stored_allocator(this->m_data.m_seq, dtl::bool_()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline get_stored_allocator_noconst_return_t get_stored_allocator() { return flat_tree_get_stored_allocator(this->m_data.m_seq, dtl::bool_()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator begin() { return this->m_data.m_seq.begin(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator begin() const { return this->cbegin(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cbegin() const { return this->m_data.m_seq.begin(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator end() { return this->m_data.m_seq.end(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator end() const { return this->cend(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cend() const { return this->m_data.m_seq.end(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rbegin() { return reverse_iterator(this->end()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rbegin() const { return this->crbegin(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crbegin() const { return const_reverse_iterator(this->cend()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rend() { return reverse_iterator(this->begin()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rend() const { return this->crend(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crend() const { return const_reverse_iterator(this->cbegin()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool empty() const { return this->m_data.m_seq.empty(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type size() const { return this->m_data.m_seq.size(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type max_size() const { return this->m_data.m_seq.max_size(); } - BOOST_CONTAINER_FORCEINLINE void swap(flat_tree& other) + inline void swap(flat_tree& other) BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value && boost::container::dtl::is_nothrow_swappable::value ) { this->m_data.swap(other.m_data); } @@ -1017,7 +1017,7 @@ class flat_tree } template - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace + inline std::pair try_emplace (const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(Args)... args) { std::pair ret; @@ -1083,7 +1083,7 @@ class flat_tree return this->insert_equal(hint, ::boost::move(*pval));\ }\ template \ - BOOST_CONTAINER_FORCEINLINE std::pair\ + inline std::pair\ try_emplace(const_iterator hint, BOOST_FWD_REF(KeyType) key BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ {\ std::pair ret;\ @@ -1126,7 +1126,7 @@ class flat_tree return ret; } - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator position) + inline iterator erase(const_iterator position) { return this->m_data.m_seq.erase(position); } size_type erase(const key_type& k) @@ -1148,10 +1148,10 @@ class flat_tree return ret; } - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last) + inline iterator erase(const_iterator first, const_iterator last) { return this->m_data.m_seq.erase(first, last); } - BOOST_CONTAINER_FORCEINLINE void clear() + inline void clear() { this->m_data.m_seq.clear(); } //! Effects: Tries to deallocate the excess of memory created @@ -1160,17 +1160,17 @@ class flat_tree //! Throws: If memory allocation throws, or T's copy constructor throws. //! //! Complexity: Linear to size(). - BOOST_CONTAINER_FORCEINLINE void shrink_to_fit() + inline void shrink_to_fit() { this->m_data.m_seq.shrink_to_fit(); } - BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW + inline iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW { const bool value = boost::container::dtl:: has_member_function_callable_with_nth::value; return flat_tree_nth(this->m_data.m_seq, n, dtl::bool_()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW { const bool value = boost::container::dtl:: @@ -1178,7 +1178,7 @@ class flat_tree return flat_tree_nth(this->m_data.m_seq, n, dtl::bool_()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW { const bool value = boost::container::dtl:: @@ -1186,7 +1186,7 @@ class flat_tree return flat_tree_index_of(this->m_data.m_seq, p, dtl::bool_()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW { const bool value = boost::container::dtl:: @@ -1263,30 +1263,30 @@ class flat_tree return n; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE bool contains(const key_type& x) const + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool contains(const key_type& x) const { return this->find(x) != this->cend(); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type contains(const K& x) const { return this->find(x) != this->cend(); } template - BOOST_CONTAINER_FORCEINLINE void merge_unique(flat_tree& source) + inline void merge_unique(flat_tree& source) { this->insert_unique( boost::make_move_iterator(source.begin()) , boost::make_move_iterator(source.end())); } template - BOOST_CONTAINER_FORCEINLINE void merge_equal(flat_tree& source) + inline void merge_equal(flat_tree& source) { this->insert_equal( boost::make_move_iterator(source.begin()) , boost::make_move_iterator(source.end())); } - BOOST_CONTAINER_FORCEINLINE void merge_unique(flat_tree& source) + inline void merge_unique(flat_tree& source) { const bool value = boost::container::dtl:: has_member_function_callable_with_merge_unique::value; @@ -1298,7 +1298,7 @@ class flat_tree , dtl::bool_()); } - BOOST_CONTAINER_FORCEINLINE void merge_equal(flat_tree& source) + inline void merge_equal(flat_tree& source) { const bool value = boost::container::dtl:: has_member_function_callable_with_merge::value; @@ -1310,88 +1310,88 @@ class flat_tree , dtl::bool_()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator lower_bound(const key_type& k) { return this->priv_lower_bound(this->begin(), this->end(), k); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator lower_bound(const key_type& k) const { return this->priv_lower_bound(this->cbegin(), this->cend(), k); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type lower_bound(const K& k) { return this->priv_lower_bound(this->begin(), this->end(), k); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type lower_bound(const K& k) const { return this->priv_lower_bound(this->cbegin(), this->cend(), k); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator upper_bound(const key_type& k) { return this->priv_upper_bound(this->begin(), this->end(), k); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator upper_bound(const key_type& k) const { return this->priv_upper_bound(this->cbegin(), this->cend(), k); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type upper_bound(const K& k) { return this->priv_upper_bound(this->begin(), this->end(), k); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type upper_bound(const K& k) const { return this->priv_upper_bound(this->cbegin(), this->cend(), k); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair equal_range(const key_type& k) { return this->priv_equal_range(this->begin(), this->end(), k); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair equal_range(const key_type& k) const { return this->priv_equal_range(this->cbegin(), this->cend(), k); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent >::type equal_range(const K& k) { return this->priv_equal_range(this->begin(), this->end(), k); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent >::type equal_range(const K& k) const { return this->priv_equal_range(this->cbegin(), this->cend(), k); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair lower_bound_range(const key_type& k) { return this->priv_lower_bound_range(this->begin(), this->end(), k); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair lower_bound_range(const key_type& k) const { return this->priv_lower_bound_range(this->cbegin(), this->cend(), k); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent >::type lower_bound_range(const K& k) { return this->priv_lower_bound_range(this->begin(), this->end(), k); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent >::type lower_bound_range(const K& k) const { return this->priv_lower_bound_range(this->cbegin(), this->cend(), k); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type capacity() const { const bool value = boost::container::dtl:: @@ -1399,7 +1399,7 @@ class flat_tree return (flat_tree_capacity)(this->m_data.m_seq, dtl::bool_()); } - BOOST_CONTAINER_FORCEINLINE + inline void reserve(size_type cnt) { const bool value = boost::container::dtl:: @@ -1407,25 +1407,25 @@ class flat_tree (flat_tree_reserve)(this->m_data.m_seq, cnt, dtl::bool_()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline container_type extract_sequence() { return boost::move(m_data.m_seq); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline container_type &get_sequence_ref() { return m_data.m_seq; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const container_type &get_sequence_cref() const { return m_data.m_seq; } - BOOST_CONTAINER_FORCEINLINE void adopt_sequence_equal(BOOST_RV_REF(container_type) seq) + inline void adopt_sequence_equal(BOOST_RV_REF(container_type) seq) { (flat_tree_adopt_sequence_equal)( m_data.m_seq, boost::move(seq), this->priv_value_comp() , dtl::bool_::value>()); } - BOOST_CONTAINER_FORCEINLINE void adopt_sequence_unique(BOOST_RV_REF(container_type) seq) + inline void adopt_sequence_unique(BOOST_RV_REF(container_type) seq) { (flat_tree_adopt_sequence_unique)(m_data.m_seq, boost::move(seq), this->priv_value_comp() , dtl::bool_::value>()); @@ -1443,35 +1443,35 @@ class flat_tree m_data.m_seq = boost::move(seq); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator==(const flat_tree& x, const flat_tree& y) { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<(const flat_tree& x, const flat_tree& y) { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator!=(const flat_tree& x, const flat_tree& y) { return !(x == y); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>(const flat_tree& x, const flat_tree& y) { return y < x; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<=(const flat_tree& x, const flat_tree& y) { return !(y < x); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>=(const flat_tree& x, const flat_tree& y) { return !(x < y); } - BOOST_CONTAINER_FORCEINLINE friend void swap(flat_tree& x, flat_tree& y) + inline friend void swap(flat_tree& x, flat_tree& y) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y))) { x.swap(y); } @@ -1492,7 +1492,7 @@ class flat_tree } } - BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const + inline bool priv_in_range_or_end(const_iterator pos) const { return (this->begin() <= pos) && (pos <= this->end()); } @@ -1535,7 +1535,7 @@ class flat_tree return commit_data.position == e || key_cmp(k, KeyOfValue()(*commit_data.position)); } - BOOST_CONTAINER_FORCEINLINE bool priv_insert_unique_prepare + inline bool priv_insert_unique_prepare (const key_type& k, insert_commit_data &commit_data) { return this->priv_insert_unique_prepare(this->cbegin(), this->cend(), k, commit_data); } @@ -1583,7 +1583,7 @@ class flat_tree } template - BOOST_CONTAINER_FORCEINLINE iterator priv_insert_commit + inline iterator priv_insert_commit (insert_commit_data &commit_data, BOOST_FWD_REF(Convertible) convertible) { return this->m_data.m_seq.insert diff --git a/include/boost/container/detail/iterators.hpp b/include/boost/container/detail/iterators.hpp index c503916..4d97eb3 100644 --- a/include/boost/container/detail/iterators.hpp +++ b/include/boost/container/detail/iterators.hpp @@ -49,125 +49,125 @@ class constant_iterator typedef constant_iterator this_type; public: - BOOST_CONTAINER_FORCEINLINE explicit constant_iterator(const T &ref, std::size_t range_size) + inline explicit constant_iterator(const T &ref, std::size_t range_size) : m_ptr(&ref), m_num(range_size){} //Constructors - BOOST_CONTAINER_FORCEINLINE constant_iterator() + inline constant_iterator() : m_ptr(0), m_num(0){} - BOOST_CONTAINER_FORCEINLINE constant_iterator& operator++() + inline constant_iterator& operator++() { increment(); return *this; } - BOOST_CONTAINER_FORCEINLINE constant_iterator operator++(int) + inline constant_iterator operator++(int) { constant_iterator result (*this); increment(); return result; } - BOOST_CONTAINER_FORCEINLINE constant_iterator& operator--() + inline constant_iterator& operator--() { decrement(); return *this; } - BOOST_CONTAINER_FORCEINLINE constant_iterator operator--(int) + inline constant_iterator operator--(int) { constant_iterator result (*this); decrement(); return result; } - BOOST_CONTAINER_FORCEINLINE friend bool operator== (const constant_iterator& i, const constant_iterator& i2) + inline friend bool operator== (const constant_iterator& i, const constant_iterator& i2) { return i.equal(i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const constant_iterator& i, const constant_iterator& i2) + inline friend bool operator!= (const constant_iterator& i, const constant_iterator& i2) { return !(i == i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator< (const constant_iterator& i, const constant_iterator& i2) + inline friend bool operator< (const constant_iterator& i, const constant_iterator& i2) { return i.less(i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator> (const constant_iterator& i, const constant_iterator& i2) + inline friend bool operator> (const constant_iterator& i, const constant_iterator& i2) { return i2 < i; } - BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const constant_iterator& i, const constant_iterator& i2) + inline friend bool operator<= (const constant_iterator& i, const constant_iterator& i2) { return !(i > i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const constant_iterator& i, const constant_iterator& i2) + inline friend bool operator>= (const constant_iterator& i, const constant_iterator& i2) { return !(i < i2); } - BOOST_CONTAINER_FORCEINLINE friend std::ptrdiff_t operator- (const constant_iterator& i, const constant_iterator& i2) + inline friend std::ptrdiff_t operator- (const constant_iterator& i, const constant_iterator& i2) { return i2.distance_to(i); } //Arithmetic signed - BOOST_CONTAINER_FORCEINLINE constant_iterator& operator+=(std::ptrdiff_t off) + inline constant_iterator& operator+=(std::ptrdiff_t off) { this->advance(off); return *this; } - BOOST_CONTAINER_FORCEINLINE constant_iterator operator+(std::ptrdiff_t off) const + inline constant_iterator operator+(std::ptrdiff_t off) const { constant_iterator other(*this); other.advance(off); return other; } - BOOST_CONTAINER_FORCEINLINE friend constant_iterator operator+(std::ptrdiff_t off, const constant_iterator& right) + inline friend constant_iterator operator+(std::ptrdiff_t off, const constant_iterator& right) { return right + off; } - BOOST_CONTAINER_FORCEINLINE constant_iterator& operator-=(std::ptrdiff_t off) + inline constant_iterator& operator-=(std::ptrdiff_t off) { this->advance(-off); return *this; } - BOOST_CONTAINER_FORCEINLINE constant_iterator operator-(std::ptrdiff_t off) const + inline constant_iterator operator-(std::ptrdiff_t off) const { return *this + (-off); } - BOOST_CONTAINER_FORCEINLINE const T& operator[] (std::ptrdiff_t ) const + inline const T& operator[] (std::ptrdiff_t ) const { return dereference(); } - BOOST_CONTAINER_FORCEINLINE const T& operator*() const + inline const T& operator*() const { return dereference(); } - BOOST_CONTAINER_FORCEINLINE const T* operator->() const + inline const T* operator->() const { return &(dereference()); } //Arithmetic unsigned - BOOST_CONTAINER_FORCEINLINE constant_iterator& operator+=(std::size_t off) + inline constant_iterator& operator+=(std::size_t off) { return *this += std::ptrdiff_t(off); } - BOOST_CONTAINER_FORCEINLINE constant_iterator operator+(std::size_t off) const + inline constant_iterator operator+(std::size_t off) const { return *this + std::ptrdiff_t(off); } - BOOST_CONTAINER_FORCEINLINE friend constant_iterator operator+(std::size_t off, const constant_iterator& right) + inline friend constant_iterator operator+(std::size_t off, const constant_iterator& right) { return std::ptrdiff_t(off) + right; } - BOOST_CONTAINER_FORCEINLINE constant_iterator& operator-=(std::size_t off) + inline constant_iterator& operator-=(std::size_t off) { return *this -= std::ptrdiff_t(off); } - BOOST_CONTAINER_FORCEINLINE constant_iterator operator-(std::size_t off) const + inline constant_iterator operator-(std::size_t off) const { return *this - std::ptrdiff_t(off); } - BOOST_CONTAINER_FORCEINLINE const T& operator[] (std::size_t off) const + inline const T& operator[] (std::size_t off) const { return (*this)[std::ptrdiff_t(off)]; } private: const T * m_ptr; std::size_t m_num; - BOOST_CONTAINER_FORCEINLINE void increment() + inline void increment() { --m_num; } - BOOST_CONTAINER_FORCEINLINE void decrement() + inline void decrement() { ++m_num; } - BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const + inline bool equal(const this_type &other) const { return m_num == other.m_num; } - BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const + inline bool less(const this_type &other) const { return other.m_num < m_num; } - BOOST_CONTAINER_FORCEINLINE const T & dereference() const + inline const T & dereference() const { return *m_ptr; } - BOOST_CONTAINER_FORCEINLINE void advance(std::ptrdiff_t n) + inline void advance(std::ptrdiff_t n) { m_num = std::size_t(std::ptrdiff_t(m_num) - n); } - BOOST_CONTAINER_FORCEINLINE std::ptrdiff_t distance_to(const this_type &other)const + inline std::ptrdiff_t distance_to(const this_type &other)const { return std::ptrdiff_t(m_num - other.m_num); } }; @@ -179,72 +179,72 @@ class value_init_construct_iterator typedef value_init_construct_iterator this_type; public: - BOOST_CONTAINER_FORCEINLINE explicit value_init_construct_iterator(std::size_t range_size) + inline explicit value_init_construct_iterator(std::size_t range_size) : m_num(range_size){} //Constructors - BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator() + inline value_init_construct_iterator() : m_num(0){} - BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator& operator++() + inline value_init_construct_iterator& operator++() { increment(); return *this; } - BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator operator++(int) + inline value_init_construct_iterator operator++(int) { value_init_construct_iterator result (*this); increment(); return result; } - BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator& operator--() + inline value_init_construct_iterator& operator--() { decrement(); return *this; } - BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator operator--(int) + inline value_init_construct_iterator operator--(int) { value_init_construct_iterator result (*this); decrement(); return result; } - BOOST_CONTAINER_FORCEINLINE friend bool operator== (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) + inline friend bool operator== (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) { return i.equal(i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) + inline friend bool operator!= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) { return !(i == i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator< (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) + inline friend bool operator< (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) { return i.less(i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator> (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) + inline friend bool operator> (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) { return i2 < i; } - BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) + inline friend bool operator<= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) { return !(i > i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) + inline friend bool operator>= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) { return !(i < i2); } - BOOST_CONTAINER_FORCEINLINE friend std::ptrdiff_t operator- (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) + inline friend std::ptrdiff_t operator- (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) { return i2.distance_to(i); } //Arithmetic - BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator& operator+=(std::ptrdiff_t off) + inline value_init_construct_iterator& operator+=(std::ptrdiff_t off) { this->advance(off); return *this; } - BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator operator+(std::ptrdiff_t off) const + inline value_init_construct_iterator operator+(std::ptrdiff_t off) const { value_init_construct_iterator other(*this); other.advance(off); return other; } - BOOST_CONTAINER_FORCEINLINE friend value_init_construct_iterator operator+(std::ptrdiff_t off, const value_init_construct_iterator& right) + inline friend value_init_construct_iterator operator+(std::ptrdiff_t off, const value_init_construct_iterator& right) { return right + off; } - BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator& operator-=(std::ptrdiff_t off) + inline value_init_construct_iterator& operator-=(std::ptrdiff_t off) { this->advance(-off); return *this; } - BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator operator-(std::ptrdiff_t off) const + inline value_init_construct_iterator operator-(std::ptrdiff_t off) const { return *this + (-off); } //This pseudo-iterator's dereference operations have no sense since value is not @@ -257,28 +257,28 @@ class value_init_construct_iterator private: std::size_t m_num; - BOOST_CONTAINER_FORCEINLINE void increment() + inline void increment() { --m_num; } - BOOST_CONTAINER_FORCEINLINE void decrement() + inline void decrement() { ++m_num; } - BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const + inline bool equal(const this_type &other) const { return m_num == other.m_num; } - BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const + inline bool less(const this_type &other) const { return other.m_num < m_num; } - BOOST_CONTAINER_FORCEINLINE const T & dereference() const + inline const T & dereference() const { static T dummy; return dummy; } - BOOST_CONTAINER_FORCEINLINE void advance(std::ptrdiff_t n) + inline void advance(std::ptrdiff_t n) { m_num = std::size_t(std::ptrdiff_t(m_num) - n); } - BOOST_CONTAINER_FORCEINLINE std::ptrdiff_t distance_to(const this_type &other)const + inline std::ptrdiff_t distance_to(const this_type &other)const { return std::ptrdiff_t(m_num - other.m_num); } }; @@ -290,72 +290,72 @@ class default_init_construct_iterator typedef default_init_construct_iterator this_type; public: - BOOST_CONTAINER_FORCEINLINE explicit default_init_construct_iterator(std::size_t range_size) + inline explicit default_init_construct_iterator(std::size_t range_size) : m_num(range_size){} //Constructors - BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator() + inline default_init_construct_iterator() : m_num(0){} - BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator& operator++() + inline default_init_construct_iterator& operator++() { increment(); return *this; } - BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator operator++(int) + inline default_init_construct_iterator operator++(int) { default_init_construct_iterator result (*this); increment(); return result; } - BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator& operator--() + inline default_init_construct_iterator& operator--() { decrement(); return *this; } - BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator operator--(int) + inline default_init_construct_iterator operator--(int) { default_init_construct_iterator result (*this); decrement(); return result; } - BOOST_CONTAINER_FORCEINLINE friend bool operator== (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) + inline friend bool operator== (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) { return i.equal(i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) + inline friend bool operator!= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) { return !(i == i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator< (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) + inline friend bool operator< (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) { return i.less(i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator> (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) + inline friend bool operator> (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) { return i2 < i; } - BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) + inline friend bool operator<= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) { return !(i > i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) + inline friend bool operator>= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) { return !(i < i2); } - BOOST_CONTAINER_FORCEINLINE friend std::ptrdiff_t operator- (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) + inline friend std::ptrdiff_t operator- (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) { return i2.distance_to(i); } //Arithmetic - BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator& operator+=(std::ptrdiff_t off) + inline default_init_construct_iterator& operator+=(std::ptrdiff_t off) { this->advance(off); return *this; } - BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator operator+(std::ptrdiff_t off) const + inline default_init_construct_iterator operator+(std::ptrdiff_t off) const { default_init_construct_iterator other(*this); other.advance(off); return other; } - BOOST_CONTAINER_FORCEINLINE friend default_init_construct_iterator operator+(std::ptrdiff_t off, const default_init_construct_iterator& right) + inline friend default_init_construct_iterator operator+(std::ptrdiff_t off, const default_init_construct_iterator& right) { return right + off; } - BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator& operator-=(std::ptrdiff_t off) + inline default_init_construct_iterator& operator-=(std::ptrdiff_t off) { this->advance(-off); return *this; } - BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator operator-(std::ptrdiff_t off) const + inline default_init_construct_iterator operator-(std::ptrdiff_t off) const { return *this + (-off); } //This pseudo-iterator's dereference operations have no sense since value is not @@ -368,28 +368,28 @@ class default_init_construct_iterator private: std::size_t m_num; - BOOST_CONTAINER_FORCEINLINE void increment() + inline void increment() { --m_num; } - BOOST_CONTAINER_FORCEINLINE void decrement() + inline void decrement() { ++m_num; } - BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const + inline bool equal(const this_type &other) const { return m_num == other.m_num; } - BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const + inline bool less(const this_type &other) const { return other.m_num < m_num; } - BOOST_CONTAINER_FORCEINLINE const T & dereference() const + inline const T & dereference() const { static T dummy; return dummy; } - BOOST_CONTAINER_FORCEINLINE void advance(std::ptrdiff_t n) + inline void advance(std::ptrdiff_t n) { m_num = std::size_t(std::ptrdiff_t(m_num) - n); } - BOOST_CONTAINER_FORCEINLINE std::ptrdiff_t distance_to(const this_type &other) const + inline std::ptrdiff_t distance_to(const this_type &other) const { return std::ptrdiff_t(m_num - other.m_num); } }; @@ -401,106 +401,106 @@ class repeat_iterator { typedef repeat_iterator this_type; public: - BOOST_CONTAINER_FORCEINLINE explicit repeat_iterator(T &ref, std::size_t range_size) + inline explicit repeat_iterator(T &ref, std::size_t range_size) : m_ptr(&ref), m_num(range_size){} //Constructors - BOOST_CONTAINER_FORCEINLINE repeat_iterator() + inline repeat_iterator() : m_ptr(0), m_num(0){} - BOOST_CONTAINER_FORCEINLINE this_type& operator++() + inline this_type& operator++() { increment(); return *this; } - BOOST_CONTAINER_FORCEINLINE this_type operator++(int) + inline this_type operator++(int) { this_type result (*this); increment(); return result; } - BOOST_CONTAINER_FORCEINLINE this_type& operator--() + inline this_type& operator--() { increment(); return *this; } - BOOST_CONTAINER_FORCEINLINE this_type operator--(int) + inline this_type operator--(int) { this_type result (*this); increment(); return result; } - BOOST_CONTAINER_FORCEINLINE friend bool operator== (const this_type& i, const this_type& i2) + inline friend bool operator== (const this_type& i, const this_type& i2) { return i.equal(i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const this_type& i, const this_type& i2) + inline friend bool operator!= (const this_type& i, const this_type& i2) { return !(i == i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator< (const this_type& i, const this_type& i2) + inline friend bool operator< (const this_type& i, const this_type& i2) { return i.less(i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator> (const this_type& i, const this_type& i2) + inline friend bool operator> (const this_type& i, const this_type& i2) { return i2 < i; } - BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const this_type& i, const this_type& i2) + inline friend bool operator<= (const this_type& i, const this_type& i2) { return !(i > i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const this_type& i, const this_type& i2) + inline friend bool operator>= (const this_type& i, const this_type& i2) { return !(i < i2); } - BOOST_CONTAINER_FORCEINLINE friend std::ptrdiff_t operator- (const this_type& i, const this_type& i2) + inline friend std::ptrdiff_t operator- (const this_type& i, const this_type& i2) { return i2.distance_to(i); } //Arithmetic - BOOST_CONTAINER_FORCEINLINE this_type& operator+=(std::ptrdiff_t off) + inline this_type& operator+=(std::ptrdiff_t off) { this->advance(off); return *this; } - BOOST_CONTAINER_FORCEINLINE this_type operator+(std::ptrdiff_t off) const + inline this_type operator+(std::ptrdiff_t off) const { this_type other(*this); other.advance(off); return other; } - BOOST_CONTAINER_FORCEINLINE friend this_type operator+(std::ptrdiff_t off, const this_type& right) + inline friend this_type operator+(std::ptrdiff_t off, const this_type& right) { return right + off; } - BOOST_CONTAINER_FORCEINLINE this_type& operator-=(std::ptrdiff_t off) + inline this_type& operator-=(std::ptrdiff_t off) { this->advance(-off); return *this; } - BOOST_CONTAINER_FORCEINLINE this_type operator-(std::ptrdiff_t off) const + inline this_type operator-(std::ptrdiff_t off) const { return *this + (-off); } - BOOST_CONTAINER_FORCEINLINE T& operator*() const + inline T& operator*() const { return dereference(); } - BOOST_CONTAINER_FORCEINLINE T& operator[] (std::ptrdiff_t ) const + inline T& operator[] (std::ptrdiff_t ) const { return dereference(); } - BOOST_CONTAINER_FORCEINLINE T *operator->() const + inline T *operator->() const { return &(dereference()); } private: T * m_ptr; std::size_t m_num; - BOOST_CONTAINER_FORCEINLINE void increment() + inline void increment() { --m_num; } - BOOST_CONTAINER_FORCEINLINE void decrement() + inline void decrement() { ++m_num; } - BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const + inline bool equal(const this_type &other) const { return m_num == other.m_num; } - BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const + inline bool less(const this_type &other) const { return other.m_num < m_num; } - BOOST_CONTAINER_FORCEINLINE T & dereference() const + inline T & dereference() const { return *m_ptr; } - BOOST_CONTAINER_FORCEINLINE void advance(std::ptrdiff_t n) + inline void advance(std::ptrdiff_t n) { m_num = std::size_t(std::ptrdiff_t(m_num - n)); } - BOOST_CONTAINER_FORCEINLINE std::ptrdiff_t distance_to(const this_type &other)const + inline std::ptrdiff_t distance_to(const this_type &other)const { return std::ptrdiff_t(m_num - other.m_num); } }; @@ -513,71 +513,71 @@ class emplace_iterator public: typedef std::ptrdiff_t difference_type; - BOOST_CONTAINER_FORCEINLINE explicit emplace_iterator(EmplaceFunctor&e) + inline explicit emplace_iterator(EmplaceFunctor&e) : m_num(1), m_pe(&e){} - BOOST_CONTAINER_FORCEINLINE emplace_iterator() + inline emplace_iterator() : m_num(0), m_pe(0){} - BOOST_CONTAINER_FORCEINLINE this_type& operator++() + inline this_type& operator++() { increment(); return *this; } - BOOST_CONTAINER_FORCEINLINE this_type operator++(int) + inline this_type operator++(int) { this_type result (*this); increment(); return result; } - BOOST_CONTAINER_FORCEINLINE this_type& operator--() + inline this_type& operator--() { decrement(); return *this; } - BOOST_CONTAINER_FORCEINLINE this_type operator--(int) + inline this_type operator--(int) { this_type result (*this); decrement(); return result; } - BOOST_CONTAINER_FORCEINLINE friend bool operator== (const this_type& i, const this_type& i2) + inline friend bool operator== (const this_type& i, const this_type& i2) { return i.equal(i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const this_type& i, const this_type& i2) + inline friend bool operator!= (const this_type& i, const this_type& i2) { return !(i == i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator< (const this_type& i, const this_type& i2) + inline friend bool operator< (const this_type& i, const this_type& i2) { return i.less(i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator> (const this_type& i, const this_type& i2) + inline friend bool operator> (const this_type& i, const this_type& i2) { return i2 < i; } - BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const this_type& i, const this_type& i2) + inline friend bool operator<= (const this_type& i, const this_type& i2) { return !(i > i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const this_type& i, const this_type& i2) + inline friend bool operator>= (const this_type& i, const this_type& i2) { return !(i < i2); } - BOOST_CONTAINER_FORCEINLINE friend difference_type operator- (const this_type& i, const this_type& i2) + inline friend difference_type operator- (const this_type& i, const this_type& i2) { return i2.distance_to(i); } //Arithmetic - BOOST_CONTAINER_FORCEINLINE this_type& operator+=(difference_type off) + inline this_type& operator+=(difference_type off) { this->advance(off); return *this; } - BOOST_CONTAINER_FORCEINLINE this_type operator+(difference_type off) const + inline this_type operator+(difference_type off) const { this_type other(*this); other.advance(off); return other; } - BOOST_CONTAINER_FORCEINLINE friend this_type operator+(difference_type off, const this_type& right) + inline friend this_type operator+(difference_type off, const this_type& right) { return right + off; } - BOOST_CONTAINER_FORCEINLINE this_type& operator-=(difference_type off) + inline this_type& operator-=(difference_type off) { this->advance(-off); return *this; } - BOOST_CONTAINER_FORCEINLINE this_type operator-(difference_type off) const + inline this_type operator-(difference_type off) const { return *this + (-off); } private: @@ -590,39 +590,39 @@ class emplace_iterator public: template - BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T* ptr) + inline void construct_in_place(Allocator &a, T* ptr) { (*m_pe)(a, ptr); } template - BOOST_CONTAINER_FORCEINLINE void assign_in_place(DestIt dest) + inline void assign_in_place(DestIt dest) { (*m_pe)(dest); } private: std::size_t m_num; EmplaceFunctor * m_pe; - BOOST_CONTAINER_FORCEINLINE void increment() + inline void increment() { --m_num; } - BOOST_CONTAINER_FORCEINLINE void decrement() + inline void decrement() { ++m_num; } - BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const + inline bool equal(const this_type &other) const { return m_num == other.m_num; } - BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const + inline bool less(const this_type &other) const { return other.m_num < m_num; } - BOOST_CONTAINER_FORCEINLINE const T & dereference() const + inline const T & dereference() const { static T dummy; return dummy; } - BOOST_CONTAINER_FORCEINLINE void advance(difference_type n) + inline void advance(difference_type n) { m_num -= n; } - BOOST_CONTAINER_FORCEINLINE difference_type distance_to(const this_type &other)const + inline difference_type distance_to(const this_type &other)const { return difference_type(m_num - other.m_num); } }; @@ -633,28 +633,28 @@ struct emplace_functor { typedef typename dtl::build_number_seq::type index_tuple_t; - BOOST_CONTAINER_FORCEINLINE emplace_functor(BOOST_FWD_REF(Args)... args) + inline emplace_functor(BOOST_FWD_REF(Args)... args) : args_(args...) {} template - BOOST_CONTAINER_FORCEINLINE void operator()(Allocator &a, T *ptr) + inline void operator()(Allocator &a, T *ptr) { emplace_functor::inplace_impl(a, ptr, index_tuple_t()); } template - BOOST_CONTAINER_FORCEINLINE void operator()(DestIt dest) + inline void operator()(DestIt dest) { emplace_functor::inplace_impl(dest, index_tuple_t()); } private: template - BOOST_CONTAINER_FORCEINLINE void inplace_impl(Allocator &a, T* ptr, const dtl::index_tuple&) + inline void inplace_impl(Allocator &a, T* ptr, const dtl::index_tuple&) { allocator_traits::construct (a, ptr, ::boost::forward(dtl::get(args_))...); } template - BOOST_CONTAINER_FORCEINLINE void inplace_impl(DestIt dest, const dtl::index_tuple&) + inline void inplace_impl(DestIt dest, const dtl::index_tuple&) { typedef typename boost::container::iterator_traits::value_type value_type; value_type && tmp= value_type(::boost::forward(dtl::get(args_))...); @@ -680,15 +680,15 @@ struct emplace_functor_type; BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ struct emplace_functor##N\ {\ - BOOST_CONTAINER_FORCEINLINE explicit emplace_functor##N( BOOST_MOVE_UREF##N )\ + inline explicit emplace_functor##N( BOOST_MOVE_UREF##N )\ BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N{}\ \ template\ - BOOST_CONTAINER_FORCEINLINE void operator()(Allocator &a, T *ptr)\ + inline void operator()(Allocator &a, T *ptr)\ { allocator_traits::construct(a, ptr BOOST_MOVE_I##N BOOST_MOVE_MFWD##N); }\ \ template\ - BOOST_CONTAINER_FORCEINLINE void operator()(DestIt dest)\ + inline void operator()(DestIt dest)\ {\ typedef typename boost::container::iterator_traits::value_type value_type;\ BOOST_MOVE_IF(N, value_type tmp(BOOST_MOVE_MFWD##N), dtl::value_init tmp) ;\ @@ -836,62 +836,62 @@ class iterator_from_iiterator typedef typename types_t::iterator_category iterator_category; typedef typename types_t::value_type value_type; - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator() + inline iterator_from_iiterator() : m_iit() {} - BOOST_CONTAINER_FORCEINLINE explicit iterator_from_iiterator(IIterator iit) BOOST_NOEXCEPT_OR_NOTHROW + inline explicit iterator_from_iiterator(IIterator iit) BOOST_NOEXCEPT_OR_NOTHROW : m_iit(iit) {} - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator(const iterator_from_iiterator& other) BOOST_NOEXCEPT_OR_NOTHROW + inline iterator_from_iiterator(const iterator_from_iiterator& other) BOOST_NOEXCEPT_OR_NOTHROW : m_iit(other.get()) {} - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator(const nonconst_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW + inline iterator_from_iiterator(const nonconst_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW : m_iit(other.get()) {} - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator=(const iterator_from_iiterator& other) BOOST_NOEXCEPT_OR_NOTHROW + inline iterator_from_iiterator& operator=(const iterator_from_iiterator& other) BOOST_NOEXCEPT_OR_NOTHROW { m_iit = other.get(); return *this; } - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW + inline iterator_from_iiterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW { ++this->m_iit; return *this; } - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW + inline iterator_from_iiterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW { iterator_from_iiterator result (*this); ++this->m_iit; return result; } - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW + inline iterator_from_iiterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW { //If the iterator_from_iiterator is not a bidirectional iterator, operator-- should not exist BOOST_STATIC_ASSERT((is_bidirectional_iterator::value)); --this->m_iit; return *this; } - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW + inline iterator_from_iiterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW { iterator_from_iiterator result (*this); --this->m_iit; return result; } - BOOST_CONTAINER_FORCEINLINE friend bool operator== (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW + inline friend bool operator== (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return l.m_iit == r.m_iit; } - BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW + inline friend bool operator!= (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return l.m_iit != r.m_iit; } - BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW + inline reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW { return this->m_iit->get_data(); } - BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW + inline pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW { return ::boost::intrusive::pointer_traits::pointer_to(this->operator*()); } - BOOST_CONTAINER_FORCEINLINE const IIterator &get() const BOOST_NOEXCEPT_OR_NOTHROW + inline const IIterator &get() const BOOST_NOEXCEPT_OR_NOTHROW { return this->m_iit; } private: diff --git a/include/boost/container/detail/next_capacity.hpp b/include/boost/container/detail/next_capacity.hpp index 9777b14..66d6e8b 100644 --- a/include/boost/container/detail/next_capacity.hpp +++ b/include/boost/container/detail/next_capacity.hpp @@ -80,11 +80,11 @@ struct growth_factor_100 {}; template -BOOST_CONTAINER_FORCEINLINE void clamp_by_stored_size_type(SizeType &, SizeType) +inline void clamp_by_stored_size_type(SizeType &, SizeType) {} template -BOOST_CONTAINER_FORCEINLINE void clamp_by_stored_size_type(SizeType &s, SomeStoredSizeType) +inline void clamp_by_stored_size_type(SizeType &s, SomeStoredSizeType) { if (s >= SomeStoredSizeType(-1) ) s = SomeStoredSizeType(-1); diff --git a/include/boost/container/detail/node_alloc_holder.hpp b/include/boost/container/detail/node_alloc_holder.hpp index 8db384e..5daa2f1 100644 --- a/include/boost/container/detail/node_alloc_holder.hpp +++ b/include/boost/container/detail/node_alloc_holder.hpp @@ -118,16 +118,16 @@ struct base_node ::boost::container::construct_in_place(a, &this->get_real_data(), it); } - BOOST_CONTAINER_FORCEINLINE T &get_data() + inline T &get_data() { return *move_detail::force_ptr(this->m_storage.data); } - BOOST_CONTAINER_FORCEINLINE const T &get_data() const + inline const T &get_data() const { return *move_detail::force_ptr(this->m_storage.data); } - BOOST_CONTAINER_FORCEINLINE internal_type &get_real_data() + inline internal_type &get_real_data() { return *move_detail::force_ptr(this->m_storage.data); } - BOOST_CONTAINER_FORCEINLINE const internal_type &get_real_data() const + inline const internal_type &get_real_data() const { return *move_detail::force_ptr(this->m_storage.data); } #if defined(BOOST_CONTAINER_DISABLE_ALIASING_WARNING) @@ -136,7 +136,7 @@ struct base_node # endif template - BOOST_CONTAINER_FORCEINLINE void destructor(Alloc &a) BOOST_NOEXCEPT + inline void destructor(Alloc &a) BOOST_NOEXCEPT { allocator_traits::destroy (a, &this->get_real_data()); @@ -144,7 +144,7 @@ struct base_node } template - BOOST_CONTAINER_FORCEINLINE + inline typename dtl::enable_if< dtl::is_pair, void >::type do_assign(const Pair &p) { @@ -154,13 +154,13 @@ struct base_node } template - BOOST_CONTAINER_FORCEINLINE + inline typename dtl::disable_if< dtl::is_pair, void >::type do_assign(const V &v) { this->get_real_data() = v; } template - BOOST_CONTAINER_FORCEINLINE + inline typename dtl::enable_if< dtl::is_pair, void >::type do_move_assign(Pair &p) { @@ -170,7 +170,7 @@ struct base_node } template - BOOST_CONTAINER_FORCEINLINE + inline typename dtl::disable_if< dtl::is_pair, void >::type do_move_assign(V &v) { this->get_real_data() = ::boost::move(v); } @@ -178,7 +178,7 @@ struct base_node private: base_node(); - BOOST_CONTAINER_FORCEINLINE ~base_node() + inline ~base_node() { } }; @@ -256,7 +256,7 @@ struct node_alloc_holder public: //Constructors for sequence containers - BOOST_CONTAINER_FORCEINLINE node_alloc_holder() + inline node_alloc_holder() {} explicit node_alloc_holder(const intrusive_bucket_traits& bt) @@ -339,30 +339,30 @@ struct node_alloc_holder , typename ICont::key_equal(eql)) { this->icont().swap(BOOST_MOVE_TO_LV(x).icont()); } - BOOST_CONTAINER_FORCEINLINE void copy_assign_alloc(const node_alloc_holder &x) + inline void copy_assign_alloc(const node_alloc_holder &x) { dtl::bool_ flag; dtl::assign_alloc( static_cast(*this) , static_cast(x), flag); } - BOOST_CONTAINER_FORCEINLINE void move_assign_alloc( node_alloc_holder &x) + inline void move_assign_alloc( node_alloc_holder &x) { dtl::bool_ flag; dtl::move_alloc( static_cast(*this) , static_cast(x), flag); } - BOOST_CONTAINER_FORCEINLINE ~node_alloc_holder() + inline ~node_alloc_holder() { this->clear(alloc_version()); } - BOOST_CONTAINER_FORCEINLINE size_type max_size() const + inline size_type max_size() const { return allocator_traits_type::max_size(this->node_alloc()); } - BOOST_CONTAINER_FORCEINLINE NodePtr allocate_one() + inline NodePtr allocate_one() { return AllocVersionTraits::allocate_one(this->node_alloc()); } - BOOST_CONTAINER_FORCEINLINE void deallocate_one(const NodePtr &p) + inline void deallocate_one(const NodePtr &p) { AllocVersionTraits::deallocate_one(this->node_alloc(), p); } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) @@ -497,7 +497,7 @@ struct node_alloc_holder } } - BOOST_CONTAINER_FORCEINLINE void clear(version_1) + inline void clear(version_1) { this->icont().clear_and_dispose(Destroyer(this->node_alloc())); } void clear(version_2) @@ -524,11 +524,11 @@ struct node_alloc_holder } template - BOOST_CONTAINER_FORCEINLINE size_type erase_key(const Key& k, version_1) + inline size_type erase_key(const Key& k, version_1) { return this->icont().erase_and_dispose(k, Destroyer(this->node_alloc())); } template - BOOST_CONTAINER_FORCEINLINE size_type erase_key(const Key& k, version_2) + inline size_type erase_key(const Key& k, version_2) { allocator_multialloc_chain_node_deallocator chain_holder(this->node_alloc()); return this->icont().erase_and_dispose(k, chain_holder.get_chain_builder()); @@ -537,11 +537,11 @@ struct node_alloc_holder protected: struct cloner { - BOOST_CONTAINER_FORCEINLINE explicit cloner(node_alloc_holder &holder) + inline explicit cloner(node_alloc_holder &holder) : m_holder(holder) {} - BOOST_CONTAINER_FORCEINLINE NodePtr operator()(const Node &other) const + inline NodePtr operator()(const Node &other) const { return m_holder.create_node(other.get_real_data()); } node_alloc_holder &m_holder; @@ -549,11 +549,11 @@ struct node_alloc_holder struct move_cloner { - BOOST_CONTAINER_FORCEINLINE move_cloner(node_alloc_holder &holder) + inline move_cloner(node_alloc_holder &holder) : m_holder(holder) {} - BOOST_CONTAINER_FORCEINLINE NodePtr operator()(Node &other) + inline NodePtr operator()(Node &other) { //Use get_real_data() instead of get_real_data to allow moving const key in [multi]map return m_holder.create_node(::boost::move(other.get_real_data())); } @@ -561,20 +561,20 @@ struct node_alloc_holder node_alloc_holder &m_holder; }; - BOOST_CONTAINER_FORCEINLINE ICont &non_const_icont() const + inline ICont &non_const_icont() const { return const_cast(this->m_icont); } - BOOST_CONTAINER_FORCEINLINE NodeAlloc &node_alloc() + inline NodeAlloc &node_alloc() { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE const NodeAlloc &node_alloc() const + inline const NodeAlloc &node_alloc() const { return static_cast(*this); } public: - BOOST_CONTAINER_FORCEINLINE ICont &icont() + inline ICont &icont() { return this->m_icont; } - BOOST_CONTAINER_FORCEINLINE const ICont &icont() const + inline const ICont &icont() const { return this->m_icont; } protected: @@ -587,10 +587,10 @@ struct key_of_node : KeyOfValue { typedef typename KeyOfValue::type type; - BOOST_CONTAINER_FORCEINLINE key_of_node() + inline key_of_node() {} - BOOST_CONTAINER_FORCEINLINE const type& operator()(const Node& x) const + inline const type& operator()(const Node& x) const { return this->KeyOfValue::operator()(x.get_data()); } }; diff --git a/include/boost/container/detail/node_pool_impl.hpp b/include/boost/container/detail/node_pool_impl.hpp index d619656..7561223 100644 --- a/include/boost/container/detail/node_pool_impl.hpp +++ b/include/boost/container/detail/node_pool_impl.hpp @@ -84,21 +84,21 @@ class private_node_pool_impl {} //!Destructor. Deallocates all allocated blocks. Never throws - BOOST_CONTAINER_FORCEINLINE ~private_node_pool_impl() + inline ~private_node_pool_impl() { this->purge_blocks(); } - BOOST_CONTAINER_FORCEINLINE size_type get_real_num_node() const + inline size_type get_real_num_node() const { return m_nodes_per_block; } //!Returns the segment manager. Never throws - BOOST_CONTAINER_FORCEINLINE segment_manager_base_type* get_segment_manager_base()const + inline segment_manager_base_type* get_segment_manager_base()const { return boost::movelib::to_raw_pointer(mp_segment_mngr_base); } - BOOST_CONTAINER_FORCEINLINE void *allocate_node() + inline void *allocate_node() { return this->priv_alloc_node(); } //!Deallocates an array pointed by ptr. Never throws - BOOST_CONTAINER_FORCEINLINE void deallocate_node(void *ptr) + inline void deallocate_node(void *ptr) { this->priv_dealloc_node(ptr); } //!Allocates a singly linked list of n nodes ending in null pointer. @@ -205,7 +205,7 @@ class private_node_pool_impl , backup_list.size()); } - BOOST_CONTAINER_FORCEINLINE size_type num_free_nodes() + inline size_type num_free_nodes() { return m_freelist.size(); } //!Deallocates all used memory. Precondition: all nodes allocated from this pool should diff --git a/include/boost/container/detail/transform_iterator.hpp b/include/boost/container/detail/transform_iterator.hpp index 5c7bbf2..35b64b8 100644 --- a/include/boost/container/detail/transform_iterator.hpp +++ b/include/boost/container/detail/transform_iterator.hpp @@ -33,13 +33,13 @@ namespace container { template struct operator_arrow_proxy { - BOOST_CONTAINER_FORCEINLINE operator_arrow_proxy(const PseudoReference &px) + inline operator_arrow_proxy(const PseudoReference &px) : m_value(px) {} typedef PseudoReference element_type; - BOOST_CONTAINER_FORCEINLINE PseudoReference* operator->() const { return &m_value; } + inline PseudoReference* operator->() const { return &m_value; } mutable PseudoReference m_value; }; @@ -47,13 +47,13 @@ struct operator_arrow_proxy template struct operator_arrow_proxy { - BOOST_CONTAINER_FORCEINLINE operator_arrow_proxy(T &px) + inline operator_arrow_proxy(T &px) : m_value(px) {} typedef T element_type; - BOOST_CONTAINER_FORCEINLINE T* operator->() const { return const_cast(&m_value); } + inline T* operator->() const { return const_cast(&m_value); } T &m_value; }; @@ -69,29 +69,29 @@ class transform_iterator , typename UnaryFunction::result_type> { public: - BOOST_CONTAINER_FORCEINLINE explicit transform_iterator(const Iterator &it, const UnaryFunction &f = UnaryFunction()) + inline explicit transform_iterator(const Iterator &it, const UnaryFunction &f = UnaryFunction()) : UnaryFunction(f), m_it(it) {} - BOOST_CONTAINER_FORCEINLINE explicit transform_iterator() + inline explicit transform_iterator() : UnaryFunction(), m_it() {} //Constructors - BOOST_CONTAINER_FORCEINLINE transform_iterator& operator++() + inline transform_iterator& operator++() { increment(); return *this; } - BOOST_CONTAINER_FORCEINLINE transform_iterator operator++(int) + inline transform_iterator operator++(int) { transform_iterator result (*this); increment(); return result; } - BOOST_CONTAINER_FORCEINLINE friend bool operator== (const transform_iterator& i, const transform_iterator& i2) + inline friend bool operator== (const transform_iterator& i, const transform_iterator& i2) { return i.equal(i2); } - BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const transform_iterator& i, const transform_iterator& i2) + inline friend bool operator!= (const transform_iterator& i, const transform_iterator& i2) { return !(i == i2); } /* @@ -104,69 +104,69 @@ class transform_iterator friend bool operator>= (const transform_iterator& i, const transform_iterator& i2) { return !(i < i2); } */ - BOOST_CONTAINER_FORCEINLINE friend typename Iterator::difference_type operator- (const transform_iterator& i, const transform_iterator& i2) + inline friend typename Iterator::difference_type operator- (const transform_iterator& i, const transform_iterator& i2) { return i2.distance_to(i); } //Arithmetic - BOOST_CONTAINER_FORCEINLINE transform_iterator& operator+=(typename Iterator::difference_type off) + inline transform_iterator& operator+=(typename Iterator::difference_type off) { this->advance(off); return *this; } - BOOST_CONTAINER_FORCEINLINE transform_iterator operator+(typename Iterator::difference_type off) const + inline transform_iterator operator+(typename Iterator::difference_type off) const { transform_iterator other(*this); other.advance(off); return other; } - BOOST_CONTAINER_FORCEINLINE friend transform_iterator operator+(typename Iterator::difference_type off, const transform_iterator& right) + inline friend transform_iterator operator+(typename Iterator::difference_type off, const transform_iterator& right) { return right + off; } - BOOST_CONTAINER_FORCEINLINE transform_iterator& operator-=(typename Iterator::difference_type off) + inline transform_iterator& operator-=(typename Iterator::difference_type off) { this->advance(-off); return *this; } - BOOST_CONTAINER_FORCEINLINE transform_iterator operator-(typename Iterator::difference_type off) const + inline transform_iterator operator-(typename Iterator::difference_type off) const { return *this + (-off); } - BOOST_CONTAINER_FORCEINLINE typename UnaryFunction::result_type operator*() const + inline typename UnaryFunction::result_type operator*() const { return dereference(); } - BOOST_CONTAINER_FORCEINLINE operator_arrow_proxy + inline operator_arrow_proxy operator->() const { return operator_arrow_proxy(dereference()); } - BOOST_CONTAINER_FORCEINLINE Iterator & base() + inline Iterator & base() { return m_it; } - BOOST_CONTAINER_FORCEINLINE const Iterator & base() const + inline const Iterator & base() const { return m_it; } private: Iterator m_it; - BOOST_CONTAINER_FORCEINLINE void increment() + inline void increment() { ++m_it; } - BOOST_CONTAINER_FORCEINLINE void decrement() + inline void decrement() { --m_it; } - BOOST_CONTAINER_FORCEINLINE bool equal(const transform_iterator &other) const + inline bool equal(const transform_iterator &other) const { return m_it == other.m_it; } - BOOST_CONTAINER_FORCEINLINE bool less(const transform_iterator &other) const + inline bool less(const transform_iterator &other) const { return other.m_it < m_it; } - BOOST_CONTAINER_FORCEINLINE typename UnaryFunction::result_type dereference() const + inline typename UnaryFunction::result_type dereference() const { return UnaryFunction::operator()(*m_it); } - BOOST_CONTAINER_FORCEINLINE void advance(typename Iterator::difference_type n) + inline void advance(typename Iterator::difference_type n) { boost::container::iterator_advance(m_it, n); } - BOOST_CONTAINER_FORCEINLINE typename Iterator::difference_type distance_to(const transform_iterator &other)const + inline typename Iterator::difference_type distance_to(const transform_iterator &other)const { return boost::container::iterator_distance(other.m_it, m_it); } }; template -BOOST_CONTAINER_FORCEINLINE transform_iterator +inline transform_iterator make_transform_iterator(Iterator it, UnaryFunc fun) { return transform_iterator(it, fun); diff --git a/include/boost/container/detail/tree.hpp b/include/boost/container/detail/tree.hpp index 843ad3c..f4a27b2 100644 --- a/include/boost/container/detail/tree.hpp +++ b/include/boost/container/detail/tree.hpp @@ -131,11 +131,11 @@ class insert_equal_end_hint_functor Icont &icont_; public: - BOOST_CONTAINER_FORCEINLINE insert_equal_end_hint_functor(Icont &icont) + inline insert_equal_end_hint_functor(Icont &icont) : icont_(icont) {} - BOOST_CONTAINER_FORCEINLINE void operator()(Node &n) + inline void operator()(Node &n) { this->icont_.insert_equal(this->icont_.cend(), n); } }; @@ -145,11 +145,11 @@ class push_back_functor Icont &icont_; public: - BOOST_CONTAINER_FORCEINLINE push_back_functor(Icont &icont) + inline push_back_functor(Icont &icont) : icont_(icont) {} - BOOST_CONTAINER_FORCEINLINE void operator()(Node &n) + inline void operator()(Node &n) { this->icont_.push_back(n); } }; @@ -267,14 +267,14 @@ template< boost::container::tree_type_enum tree_type_value struct intrusive_tree_proxy { template - BOOST_CONTAINER_FORCEINLINE static void rebalance(Icont &) {} + inline static void rebalance(Icont &) {} }; template struct intrusive_tree_proxy { template - BOOST_CONTAINER_FORCEINLINE static void rebalance(Icont &c) + inline static void rebalance(Icont &c) { c.rebalance(); } }; @@ -298,10 +298,10 @@ class RecyclingCloner : m_holder(holder), m_icont(itree) {} - BOOST_CONTAINER_FORCEINLINE static void do_assign(node_ptr_type p, node_t &other, bool_) + inline static void do_assign(node_ptr_type p, node_t &other, bool_) { p->do_move_assign(other.get_real_data()); } - BOOST_CONTAINER_FORCEINLINE static void do_assign(node_ptr_type p, const node_t &other, bool_) + inline static void do_assign(node_ptr_type p, const node_t &other, bool_) { p->do_assign(other.get_real_data()); } node_ptr_type operator() @@ -461,19 +461,19 @@ class tree public: - BOOST_CONTAINER_FORCEINLINE tree() + inline tree() : AllocHolder() {} - BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp) + inline explicit tree(const key_compare& comp) : AllocHolder(ValComp(comp)) {} - BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp, const allocator_type& a) + inline explicit tree(const key_compare& comp, const allocator_type& a) : AllocHolder(ValComp(comp), a) {} - BOOST_CONTAINER_FORCEINLINE explicit tree(const allocator_type& a) + inline explicit tree(const allocator_type& a) : AllocHolder(a) {} @@ -616,19 +616,19 @@ class tree public: - BOOST_CONTAINER_FORCEINLINE tree(const tree& x) + inline tree(const tree& x) : AllocHolder(x, x.value_comp()) { this->icont().clone_from (x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc())); } - BOOST_CONTAINER_FORCEINLINE tree(BOOST_RV_REF(tree) x) + inline tree(BOOST_RV_REF(tree) x) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : AllocHolder(BOOST_MOVE_BASE(AllocHolder, x), x.value_comp()) {} - BOOST_CONTAINER_FORCEINLINE tree(const tree& x, const allocator_type &a) + inline tree(const tree& x, const allocator_type &a) : AllocHolder(x.value_comp(), a) { this->icont().clone_from @@ -649,7 +649,7 @@ class tree //AllocHolder clears in case of exception } - BOOST_CONTAINER_FORCEINLINE ~tree() + inline ~tree() {} //AllocHolder clears the tree tree& operator=(BOOST_COPY_ASSIGN_REF(tree) x) @@ -729,56 +729,56 @@ class tree public: // accessors: - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline value_compare value_comp() const { return value_compare(this->key_comp()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline key_compare key_comp() const { return this->icont().key_comp(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline allocator_type get_allocator() const { return allocator_type(this->node_alloc()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const stored_allocator_type &get_stored_allocator() const { return this->node_alloc(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline stored_allocator_type &get_stored_allocator() { return this->node_alloc(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator begin() { return iterator(this->icont().begin()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator begin() const { return this->cbegin(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator end() { return iterator(this->icont().end()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator end() const { return this->cend(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rbegin() { return reverse_iterator(end()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rbegin() const { return this->crbegin(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rend() { return reverse_iterator(begin()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rend() const { return this->crend(); } @@ -787,7 +787,7 @@ class tree //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cbegin() const { return const_iterator(this->non_const_icont().begin()); } @@ -796,7 +796,7 @@ class tree //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cend() const { return const_iterator(this->non_const_icont().end()); } @@ -806,7 +806,7 @@ class tree //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crbegin() const { return const_reverse_iterator(cend()); } @@ -816,23 +816,23 @@ class tree //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crend() const { return const_reverse_iterator(cbegin()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool empty() const { return !this->size(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type size() const { return this->icont().size(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type max_size() const { return AllocHolder::max_size(); } - BOOST_CONTAINER_FORCEINLINE void swap(ThisType& x) + inline void swap(ThisType& x) BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value && boost::container::dtl::is_nothrow_swappable::value ) { AllocHolder::swap(x); } @@ -962,11 +962,11 @@ class tree #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template - BOOST_CONTAINER_FORCEINLINE std::pair emplace_unique(BOOST_FWD_REF(Args)... args) + inline std::pair emplace_unique(BOOST_FWD_REF(Args)... args) { return this->emplace_unique_node(AllocHolder::create_node(boost::forward(args)...)); } template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint_unique(const_iterator hint, BOOST_FWD_REF(Args)... args) + inline iterator emplace_hint_unique(const_iterator hint, BOOST_FWD_REF(Args)... args) { return this->emplace_hint_unique_node(hint, AllocHolder::create_node(boost::forward(args)...)); } template @@ -991,7 +991,7 @@ class tree } template - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace + inline std::pair try_emplace (const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(Args)... args) { insert_commit_data data; @@ -1039,7 +1039,7 @@ class tree }\ \ template \ - BOOST_CONTAINER_FORCEINLINE std::pair\ + inline std::pair\ try_emplace(const_iterator hint, BOOST_FWD_REF(KeyType) key BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ {\ insert_commit_data data;\ @@ -1122,7 +1122,7 @@ class tree return iterator(this->icont().erase_and_dispose(position.get(), Destroyer(this->node_alloc()))); } - BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& k) + inline size_type erase(const key_type& k) { return AllocHolder::erase_key(k, alloc_version()); } size_type erase_unique(const key_type& k) @@ -1209,105 +1209,105 @@ class tree } template - BOOST_CONTAINER_FORCEINLINE void merge_unique(tree& source) + inline void merge_unique(tree& source) { return this->icont().merge_unique(source.icont()); } template - BOOST_CONTAINER_FORCEINLINE void merge_equal(tree& source) + inline void merge_equal(tree& source) { return this->icont().merge_equal(source.icont()); } - BOOST_CONTAINER_FORCEINLINE void clear() + inline void clear() { AllocHolder::clear(alloc_version()); } // search operations. Const and non-const overloads even if no iterator is returned // so splay implementations can to their rebalancing when searching in non-const versions - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator find(const key_type& k) { return iterator(this->icont().find(k)); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator find(const key_type& k) const { return const_iterator(this->non_const_icont().find(k)); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type find(const K& k) { return iterator(this->icont().find(k, KeyNodeCompare())); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type find(const K& k) const { return const_iterator(this->non_const_icont().find(k, KeyNodeCompare())); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type count(const key_type& k) const { return size_type(this->icont().count(k)); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type count(const K& k) const { return size_type(this->icont().count(k, KeyNodeCompare())); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool contains(const key_type& x) const { return this->find(x) != this->cend(); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type contains(const K& x) const { return this->find(x) != this->cend(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator lower_bound(const key_type& k) { return iterator(this->icont().lower_bound(k)); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator lower_bound(const key_type& k) const { return const_iterator(this->non_const_icont().lower_bound(k)); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type lower_bound(const K& k) { return iterator(this->icont().lower_bound(k, KeyNodeCompare())); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type lower_bound(const K& k) const { return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare())); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator upper_bound(const key_type& k) { return iterator(this->icont().upper_bound(k)); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator upper_bound(const key_type& k) const { return const_iterator(this->non_const_icont().upper_bound(k)); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type upper_bound(const K& k) { return iterator(this->icont().upper_bound(k, KeyNodeCompare())); } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent::type upper_bound(const K& k) const { return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare())); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair equal_range(const key_type& k) { std::pair ret = this->icont().equal_range(k); return std::pair(iterator(ret.first), iterator(ret.second)); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair equal_range(const key_type& k) const { std::pair ret = @@ -1317,7 +1317,7 @@ class tree } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent >::type equal_range(const K& k) { @@ -1327,7 +1327,7 @@ class tree } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent >::type equal_range(const K& k) const { @@ -1337,7 +1337,7 @@ class tree (const_iterator(ret.first), const_iterator(ret.second)); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair lower_bound_range(const key_type& k) { std::pair ret = @@ -1345,7 +1345,7 @@ class tree return std::pair(iterator(ret.first), iterator(ret.second)); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair lower_bound_range(const key_type& k) const { std::pair ret = @@ -1355,7 +1355,7 @@ class tree } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent >::type lower_bound_range(const K& k) { @@ -1365,7 +1365,7 @@ class tree } template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline typename dtl::enable_if_transparent >::type lower_bound_range(const K& k) const { @@ -1375,34 +1375,34 @@ class tree (const_iterator(ret.first), const_iterator(ret.second)); } - BOOST_CONTAINER_FORCEINLINE void rebalance() + inline void rebalance() { intrusive_tree_proxy_t::rebalance(this->icont()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator==(const tree& x, const tree& y) { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<(const tree& x, const tree& y) { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator!=(const tree& x, const tree& y) { return !(x == y); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>(const tree& x, const tree& y) { return y < x; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<=(const tree& x, const tree& y) { return !(y < x); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>=(const tree& x, const tree& y) { return !(x < y); } - BOOST_CONTAINER_FORCEINLINE friend void swap(tree& x, tree& y) + inline friend void swap(tree& x, tree& y) BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value && boost::container::dtl::is_nothrow_swappable::value ) { x.swap(y); } diff --git a/include/boost/container/detail/value_init.hpp b/include/boost/container/detail/value_init.hpp index 35b0aa1..08a1f84 100644 --- a/include/boost/container/detail/value_init.hpp +++ b/include/boost/container/detail/value_init.hpp @@ -31,13 +31,13 @@ namespace dtl { template struct value_init { - value_init() + BOOST_CONTAINER_FORCEINLINE value_init() : m_t() {} - operator T &() { return m_t; } + BOOST_CONTAINER_FORCEINLINE operator T &() { return m_t; } - T &get() { return m_t; } + BOOST_CONTAINER_FORCEINLINE T &get() { return m_t; } T m_t; }; diff --git a/include/boost/container/devector.hpp b/include/boost/container/devector.hpp index eac5b79..5195fa0 100644 --- a/include/boost/container/devector.hpp +++ b/include/boost/container/devector.hpp @@ -508,7 +508,7 @@ class devector * [propagate_on_container_copy_assignment]: http://en.cppreference.com/w/cpp/memory/allocator_traits */ - BOOST_CONTAINER_FORCEINLINE devector& operator=(BOOST_COPY_ASSIGN_REF(devector) rhs) + inline devector& operator=(BOOST_COPY_ASSIGN_REF(devector) rhs) { const devector &x = rhs; if (this == &x) { return *this; } // skip self @@ -636,7 +636,7 @@ class devector * [CopyInsertable]: http://en.cppreference.com/w/cpp/concept/CopyInsertable * [CopyAssignable]: http://en.cppreference.com/w/cpp/concept/CopyAssignable */ - BOOST_CONTAINER_FORCEINLINE devector& operator=(std::initializer_list il) + inline devector& operator=(std::initializer_list il) { this->assign(il.begin(), il.end()); return *this; @@ -733,7 +733,7 @@ class devector * [CopyInsertable]: http://en.cppreference.com/w/cpp/concept/CopyInsertable * [CopyAssignable]: http://en.cppreference.com/w/cpp/concept/CopyAssignable */ - BOOST_CONTAINER_FORCEINLINE void assign(size_type n, const T& u) + inline void assign(size_type n, const T& u) { cvalue_iterator first(u, n); cvalue_iterator last; @@ -742,7 +742,7 @@ class devector #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) /** **Equivalent to**: `assign(il.begin(), il.end())`. */ - BOOST_CONTAINER_FORCEINLINE void assign(std::initializer_list il) + inline void assign(std::initializer_list il) { this->assign(il.begin(), il.end()); } @@ -753,19 +753,19 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline allocator_type get_allocator() const BOOST_NOEXCEPT { return static_cast(m_); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const allocator_type &get_stored_allocator() const BOOST_NOEXCEPT { return static_cast(m_); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline allocator_type &get_stored_allocator() BOOST_NOEXCEPT { return static_cast(m_); @@ -779,7 +779,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator begin() BOOST_NOEXCEPT { return m_.buffer + m_.front_idx; @@ -791,7 +791,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator begin() const BOOST_NOEXCEPT { return m_.buffer + m_.front_idx; @@ -802,7 +802,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator end() BOOST_NOEXCEPT { return m_.buffer + m_.back_idx; @@ -813,7 +813,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator end() const BOOST_NOEXCEPT { return m_.buffer + m_.back_idx; @@ -825,7 +825,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rbegin() BOOST_NOEXCEPT { return reverse_iterator(m_.buffer + m_.back_idx); @@ -838,7 +838,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rbegin() const BOOST_NOEXCEPT { return const_reverse_iterator(m_.buffer + m_.back_idx); @@ -850,7 +850,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rend() BOOST_NOEXCEPT { return reverse_iterator(m_.buffer + m_.front_idx); @@ -862,7 +862,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rend() const BOOST_NOEXCEPT { return const_reverse_iterator(m_.buffer + m_.front_idx); @@ -874,7 +874,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cbegin() const BOOST_NOEXCEPT { return m_.buffer + m_.front_idx; @@ -897,7 +897,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crbegin() const BOOST_NOEXCEPT { return const_reverse_iterator(m_.buffer + m_.back_idx); @@ -909,7 +909,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crend() const BOOST_NOEXCEPT { return const_reverse_iterator(m_.buffer + m_.front_idx); @@ -922,7 +922,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool empty() const BOOST_NOEXCEPT { return m_.front_idx == m_.back_idx; @@ -933,7 +933,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type size() const BOOST_NOEXCEPT { return size_type(m_.back_idx - m_.front_idx); @@ -944,7 +944,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type max_size() const BOOST_NOEXCEPT { size_type alloc_max = allocator_traits_type::max_size(get_allocator_ref()); @@ -961,7 +961,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type capacity() const BOOST_NOEXCEPT { size_type const cap_reserve = m_.capacity/devector_min_free_fraction; @@ -974,7 +974,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type front_free_capacity() const BOOST_NOEXCEPT { return m_.front_idx; @@ -986,7 +986,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type back_free_capacity() const BOOST_NOEXCEPT { return size_type(m_.capacity - m_.back_idx); @@ -1009,7 +1009,7 @@ class devector * [MoveInsertable]: http://en.cppreference.com/w/cpp/concept/MoveInsertable * [DefaultConstructible]: http://en.cppreference.com/w/cpp/concept/DefaultConstructible */ - BOOST_CONTAINER_FORCEINLINE void resize(size_type sz) + inline void resize(size_type sz) { this->resize_back(sz); } @@ -1018,7 +1018,7 @@ class devector * **Effects**: Same as resize(sz) but creates default-initialized * value-initialized. */ - BOOST_CONTAINER_FORCEINLINE void resize(size_type sz, default_init_t) + inline void resize(size_type sz, default_init_t) { this->resize_back(sz, default_init); } @@ -1039,7 +1039,7 @@ class devector * * **Complexity**: Linear in the size of `*this` and `sz`. */ - BOOST_CONTAINER_FORCEINLINE void resize(size_type sz, const T& c) + inline void resize(size_type sz, const T& c) { this->resize_back(sz, c); } @@ -1062,7 +1062,7 @@ class devector * [MoveInsertable]: http://en.cppreference.com/w/cpp/concept/MoveInsertable * [DefaultConstructible]: http://en.cppreference.com/w/cpp/concept/DefaultConstructible */ - BOOST_CONTAINER_FORCEINLINE void resize_front(size_type sz) + inline void resize_front(size_type sz) { resize_front_impl(sz); BOOST_ASSERT(invariants_ok()); @@ -1085,7 +1085,7 @@ class devector * * [MoveInsertable]: http://en.cppreference.com/w/cpp/concept/MoveInsertable */ - BOOST_CONTAINER_FORCEINLINE void resize_front(size_type sz, default_init_t) + inline void resize_front(size_type sz, default_init_t) { resize_front_impl(sz, default_init); BOOST_ASSERT(invariants_ok()); @@ -1108,7 +1108,7 @@ class devector * * **Complexity**: Linear in the size of `*this` and `sz`. */ - BOOST_CONTAINER_FORCEINLINE void resize_front(size_type sz, const T& c) + inline void resize_front(size_type sz, const T& c) { resize_front_impl(sz, c); BOOST_ASSERT(invariants_ok()); @@ -1132,7 +1132,7 @@ class devector * [MoveInsertable]: http://en.cppreference.com/w/cpp/concept/MoveInsertable * [DefaultConstructible]: http://en.cppreference.com/w/cpp/concept/DefaultConstructible */ - BOOST_CONTAINER_FORCEINLINE void resize_back(size_type sz) + inline void resize_back(size_type sz) { resize_back_impl(sz); BOOST_ASSERT(invariants_ok()); @@ -1155,7 +1155,7 @@ class devector * * [MoveInsertable]: http://en.cppreference.com/w/cpp/concept/MoveInsertable */ - BOOST_CONTAINER_FORCEINLINE void resize_back(size_type sz, default_init_t) + inline void resize_back(size_type sz, default_init_t) { resize_back_impl(sz, default_init); BOOST_ASSERT(invariants_ok()); @@ -1177,7 +1177,7 @@ class devector * * **Complexity**: Linear in the size of `*this` and `sz`. */ - BOOST_CONTAINER_FORCEINLINE void resize_back(size_type sz, const T& c) + inline void resize_back(size_type sz, const T& c) { resize_back_impl(sz, c); BOOST_ASSERT(invariants_ok()); @@ -1199,7 +1199,7 @@ class devector * * **Throws**: length_error if `new_capacity > max_size()`. */ - BOOST_CONTAINER_FORCEINLINE void reserve(size_type new_capacity) + inline void reserve(size_type new_capacity) { if (this->capacity() < new_capacity) { const size_type rounder = devector_min_free_fraction - 2u; @@ -1228,7 +1228,7 @@ class devector * * **Throws**: `length_error` if `new_capacity > max_size()`. */ - BOOST_CONTAINER_FORCEINLINE void reserve_front(size_type new_capacity) + inline void reserve_front(size_type new_capacity) { if (front_capacity() >= new_capacity) { return; } @@ -1253,7 +1253,7 @@ class devector * * **Throws**: length_error if `new_capacity > max_size()`. */ - BOOST_CONTAINER_FORCEINLINE void reserve_back(size_type new_capacity) + inline void reserve_back(size_type new_capacity) { if (back_capacity() >= new_capacity) { return; } @@ -1274,7 +1274,7 @@ class devector * * **Complexity**: Linear in the size of *this. */ - BOOST_CONTAINER_FORCEINLINE void shrink_to_fit() + inline void shrink_to_fit() { if(this->front_capacity() || this->back_capacity()) this->reallocate_at(size(), 0); @@ -1289,7 +1289,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference operator[](size_type n) BOOST_NOEXCEPT { BOOST_ASSERT(n < size()); @@ -1303,7 +1303,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference operator[](size_type n) const BOOST_NOEXCEPT { BOOST_ASSERT(n < size()); @@ -1317,7 +1317,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference at(size_type n) { if (size() <= n) @@ -1332,7 +1332,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference at(size_type n) const { if (size() <= n) @@ -1347,7 +1347,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference front() BOOST_NOEXCEPT { BOOST_ASSERT(!empty()); @@ -1362,7 +1362,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference front() const BOOST_NOEXCEPT { BOOST_ASSERT(!empty()); @@ -1377,7 +1377,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference back() BOOST_NOEXCEPT { BOOST_ASSERT(!empty()); @@ -1392,7 +1392,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference back() const BOOST_NOEXCEPT { BOOST_ASSERT(!empty()); @@ -1407,7 +1407,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline T* data() BOOST_NOEXCEPT { return boost::movelib::to_raw_pointer(m_.buffer) + m_.front_idx; @@ -1420,7 +1420,7 @@ class devector * * **Complexity**: Constant. */ - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const T* data() const BOOST_NOEXCEPT { return boost::movelib::to_raw_pointer(m_.buffer) + m_.front_idx; @@ -1467,7 +1467,7 @@ class devector #define BOOST_CONTAINER_DEVECTOR_EMPLACE_FRONT(N) \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE reference emplace_front(BOOST_MOVE_UREF##N)\ + inline reference emplace_front(BOOST_MOVE_UREF##N)\ {\ if (front_free_capacity())\ {\ @@ -1562,7 +1562,7 @@ class devector */ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) template - BOOST_CONTAINER_FORCEINLINE reference emplace_back(Args&&... args) + inline reference emplace_back(Args&&... args) { if (BOOST_LIKELY(this->back_free_capacity() != 0)){ pointer const p = m_.buffer + m_.back_idx; @@ -1581,7 +1581,7 @@ class devector #define BOOST_CONTAINER_DEVECTOR_EMPLACE_BACK(N) \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE reference emplace_back(BOOST_MOVE_UREF##N)\ + inline reference emplace_back(BOOST_MOVE_UREF##N)\ {\ if (this->back_free_capacity()){\ pointer const p = m_.buffer + m_.back_idx;\ @@ -1855,7 +1855,7 @@ class devector * [CopyInsertable]: http://en.cppreference.com/w/cpp/concept/CopyInsertable * [CopyAssignable]: http://en.cppreference.com/w/cpp/concept/CopyAssignable */ - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator position, size_type n, const T& x) + inline iterator insert(const_iterator position, size_type n, const T& x) { cvalue_iterator first(x, n); cvalue_iterator last = first + n; @@ -1928,7 +1928,7 @@ class devector #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED template - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator position, ForwardIterator first, ForwardIterator last + inline iterator insert(const_iterator position, ForwardIterator first, ForwardIterator last //Other iterators BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_or < void @@ -1944,7 +1944,7 @@ class devector #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) /** **Equivalent to**: `insert(position, il.begin(), il.end())` */ - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator position, std::initializer_list il) + inline iterator insert(const_iterator position, std::initializer_list il) { return this->insert(position, il.begin(), il.end()); } @@ -2106,99 +2106,99 @@ class devector m_.front_idx = m_.back_idx = 0; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator==(const devector& x, const devector& y) { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator!=(const devector& x, const devector& y) { return !(x == y); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator< (const devector& x, const devector& y) { return boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>(const devector& x, const devector& y) { return y < x; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<=(const devector& x, const devector& y) { return !(y < x); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>=(const devector& x, const devector& y) { return !(x < y); } - BOOST_CONTAINER_FORCEINLINE friend void swap(devector& x, devector& y) + inline friend void swap(devector& x, devector& y) BOOST_NOEXCEPT_IF( allocator_traits_type::propagate_on_container_swap::value || allocator_traits_type::is_always_equal::value) { x.swap(y); } private: - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type pos_to_index(const_iterator i) const { return static_cast(i - cbegin()); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool should_move_back(const_iterator i) const { return static_cast(this->pos_to_index(i)) >= this->size()/2u; } - BOOST_CONTAINER_FORCEINLINE static iterator unconst_iterator(const_iterator i) + inline static iterator unconst_iterator(const_iterator i) { return boost::intrusive::pointer_traits::const_cast_from(i); } - BOOST_CONTAINER_FORCEINLINE size_type front_capacity() const + inline size_type front_capacity() const { return m_.back_idx; } - BOOST_CONTAINER_FORCEINLINE size_type back_capacity() const + inline size_type back_capacity() const { return size_type(m_.capacity - m_.front_idx); } #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - BOOST_CONTAINER_FORCEINLINE T* priv_raw_begin() BOOST_NOEXCEPT + inline T* priv_raw_begin() BOOST_NOEXCEPT { return boost::movelib::to_raw_pointer(m_.buffer) + m_.front_idx; } - BOOST_CONTAINER_FORCEINLINE T* priv_raw_end() BOOST_NOEXCEPT + inline T* priv_raw_end() BOOST_NOEXCEPT { return boost::movelib::to_raw_pointer(m_.buffer) + m_.back_idx; } template - BOOST_CONTAINER_FORCEINLINE void priv_push_front(BOOST_FWD_REF(U) u) + inline void priv_push_front(BOOST_FWD_REF(U) u) { this->emplace_front(boost::forward(u)); } template - BOOST_CONTAINER_FORCEINLINE void priv_push_back(BOOST_FWD_REF(U) u) + inline void priv_push_back(BOOST_FWD_REF(U) u) { this->emplace_back(boost::forward(u)); } template - BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator pos, BOOST_FWD_REF(U) u) + inline iterator priv_insert(const_iterator pos, BOOST_FWD_REF(U) u) { return this->emplace(pos, boost::forward(u)); } // allocator_type wrappers - BOOST_CONTAINER_FORCEINLINE allocator_type& get_allocator_ref() BOOST_NOEXCEPT + inline allocator_type& get_allocator_ref() BOOST_NOEXCEPT { return static_cast(m_); } - BOOST_CONTAINER_FORCEINLINE const allocator_type& get_allocator_ref() const BOOST_NOEXCEPT + inline const allocator_type& get_allocator_ref() const BOOST_NOEXCEPT { return static_cast(m_); } @@ -2230,7 +2230,7 @@ class devector #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) template - BOOST_CONTAINER_FORCEINLINE void alloc_construct(pointer dst, Args&&... args) + inline void alloc_construct(pointer dst, Args&&... args) { allocator_traits_type::construct( get_allocator_ref(), @@ -2260,7 +2260,7 @@ class devector #define BOOST_CONTAINER_DEVECTOR_ALLOC_CONSTRUCT(N) \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE void alloc_construct(pointer dst BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline void alloc_construct(pointer dst BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ {\ allocator_traits_type::construct(\ get_allocator_ref(), boost::movelib::to_raw_pointer(dst) BOOST_MOVE_I##N BOOST_MOVE_FWD##N );\ @@ -2783,7 +2783,7 @@ class devector } template - BOOST_CONTAINER_FORCEINLINE void overwrite_buffer(ForwardIterator first, ForwardIterator last) + inline void overwrite_buffer(ForwardIterator first, ForwardIterator last) { this->overwrite_buffer_impl(first, last, dtl::bool_::value>()); @@ -2894,17 +2894,17 @@ class devector i.back_idx = 0; } - BOOST_CONTAINER_FORCEINLINE void set_back_idx(size_type bi) + inline void set_back_idx(size_type bi) { back_idx = static_cast(bi); } - BOOST_CONTAINER_FORCEINLINE void set_front_idx(size_type fi) + inline void set_front_idx(size_type fi) { front_idx = static_cast(fi); } - BOOST_CONTAINER_FORCEINLINE void set_capacity(size_type c) + inline void set_capacity(size_type c) { capacity = static_cast(c); } diff --git a/include/boost/container/flat_map.hpp b/include/boost/container/flat_map.hpp index cd86255..f84ecf2 100644 --- a/include/boost/container/flat_map.hpp +++ b/include/boost/container/flat_map.hpp @@ -154,10 +154,10 @@ class flat_map typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type; typedef typename impl_tree_t::sequence_type impl_sequence_type; - BOOST_CONTAINER_FORCEINLINE impl_tree_t &tree() + inline impl_tree_t &tree() { return m_flat_tree; } - BOOST_CONTAINER_FORCEINLINE const impl_tree_t &tree() const + inline const impl_tree_t &tree() const { return m_flat_tree; } private: @@ -209,7 +209,7 @@ class flat_map //! Effects: Default constructs an empty flat_map. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE flat_map() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value && + inline flat_map() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value && dtl::is_nothrow_default_constructible::value) : m_flat_tree() {} @@ -217,7 +217,7 @@ class flat_map //! Effects: Constructs an empty flat_map using the specified allocator. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit flat_map(const allocator_type& a) + inline explicit flat_map(const allocator_type& a) : m_flat_tree(dtl::force(a)) {} @@ -225,7 +225,7 @@ class flat_map //! comparison object. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit flat_map(const Compare& comp) + inline explicit flat_map(const Compare& comp) : m_flat_tree(comp) {} @@ -233,7 +233,7 @@ class flat_map //! comparison object and allocator. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE flat_map(const Compare& comp, const allocator_type& a) + inline flat_map(const Compare& comp, const allocator_type& a) : m_flat_tree(comp, dtl::force(a)) {} @@ -243,7 +243,7 @@ class flat_map //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last) + inline flat_map(InputIterator first, InputIterator last) : m_flat_tree(true, first, last) {} @@ -253,7 +253,7 @@ class flat_map //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const allocator_type& a) + inline flat_map(InputIterator first, InputIterator last, const allocator_type& a) : m_flat_tree(true, first, last, dtl::force(a)) {} @@ -263,7 +263,7 @@ class flat_map //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const Compare& comp) + inline flat_map(InputIterator first, InputIterator last, const Compare& comp) : m_flat_tree(true, first, last, comp) {} @@ -273,7 +273,7 @@ class flat_map //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) + inline flat_map(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : m_flat_tree(true, first, last, comp, dtl::force(a)) {} @@ -287,7 +287,7 @@ class flat_map //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE + inline flat_map(ordered_unique_range_t, InputIterator first, InputIterator last) : m_flat_tree(ordered_range, first, last) {} @@ -302,7 +302,7 @@ class flat_map //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE + inline flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp) : m_flat_tree(ordered_range, first, last, comp) {} @@ -317,7 +317,7 @@ class flat_map //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE + inline flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : m_flat_tree(ordered_range, first, last, comp, dtl::force(a)) {} @@ -332,7 +332,7 @@ class flat_map //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE + inline flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const allocator_type& a) : m_flat_tree(ordered_range, first, last, Compare(), a) {} @@ -343,7 +343,7 @@ class flat_map //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list il) + inline flat_map(std::initializer_list il) : m_flat_tree( true , dtl::force(il).begin() , dtl::force(il).end()) @@ -354,7 +354,7 @@ class flat_map //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list il, const allocator_type& a) + inline flat_map(std::initializer_list il, const allocator_type& a) : m_flat_tree( true , dtl::force(il).begin() , dtl::force(il).end() @@ -366,7 +366,7 @@ class flat_map //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list il, const Compare& comp) + inline flat_map(std::initializer_list il, const Compare& comp) : m_flat_tree(true , dtl::force(il).begin() , dtl::force(il).end() @@ -378,7 +378,7 @@ class flat_map //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list il, const Compare& comp, const allocator_type& a) + inline flat_map(std::initializer_list il, const Compare& comp, const allocator_type& a) : m_flat_tree(true , dtl::force(il).begin() , dtl::force(il).end() @@ -396,7 +396,7 @@ class flat_map //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list il) + inline flat_map(ordered_unique_range_t, std::initializer_list il) : m_flat_tree(ordered_unique_range , dtl::force(il).begin() , dtl::force(il).end()) @@ -412,7 +412,7 @@ class flat_map //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list il, const Compare& comp) + inline flat_map(ordered_unique_range_t, std::initializer_list il, const Compare& comp) : m_flat_tree(ordered_unique_range , dtl::force(il).begin() , dtl::force(il).end() @@ -429,7 +429,7 @@ class flat_map //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) + inline flat_map(ordered_unique_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) : m_flat_tree( ordered_unique_range , dtl::force(il).begin() , dtl::force(il).end() @@ -441,7 +441,7 @@ class flat_map //! Effects: Copy constructs a flat_map. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE flat_map(const flat_map& x) + inline flat_map(const flat_map& x) : m_flat_tree(x.m_flat_tree) {} @@ -451,7 +451,7 @@ class flat_map //! Complexity: Constant. //! //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE flat_map(BOOST_RV_REF(flat_map) x) + inline flat_map(BOOST_RV_REF(flat_map) x) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : m_flat_tree(boost::move(x.m_flat_tree)) {} @@ -459,7 +459,7 @@ class flat_map //! Effects: Copy constructs a flat_map using the specified allocator. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE flat_map(const flat_map& x, const allocator_type &a) + inline flat_map(const flat_map& x, const allocator_type &a) : m_flat_tree(x.m_flat_tree, dtl::force(a)) {} @@ -467,14 +467,14 @@ class flat_map //! Constructs *this using x's resources. //! //! Complexity: Constant if x.get_allocator() == a, linear otherwise. - BOOST_CONTAINER_FORCEINLINE flat_map(BOOST_RV_REF(flat_map) x, const allocator_type &a) + inline flat_map(BOOST_RV_REF(flat_map) x, const allocator_type &a) : m_flat_tree(boost::move(x.m_flat_tree), dtl::force(a)) {} //! Effects: Makes *this a copy of x. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE flat_map& operator=(BOOST_COPY_ASSIGN_REF(flat_map) x) + inline flat_map& operator=(BOOST_COPY_ASSIGN_REF(flat_map) x) { m_flat_tree = x.m_flat_tree; return *this; } //! Effects: Move constructs a flat_map. @@ -486,7 +486,7 @@ class flat_map //! Complexity: Constant if allocator_traits_type:: //! propagate_on_container_move_assignment is true or //! this->get>allocator() == x.get_allocator(). Linear otherwise. - BOOST_CONTAINER_FORCEINLINE flat_map& operator=(BOOST_RV_REF(flat_map) x) + inline flat_map& operator=(BOOST_RV_REF(flat_map) x) BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || allocator_traits_type::is_always_equal::value) && boost::container::dtl::is_nothrow_move_assignable::value) @@ -506,7 +506,7 @@ class flat_map //! was passed to the object's constructor. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.get_allocator()); } @@ -517,7 +517,7 @@ class flat_map //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline get_stored_allocator_noconst_return_t get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW { impl_get_stored_allocator_noconst_return_t r = m_flat_tree.get_stored_allocator(); @@ -531,7 +531,7 @@ class flat_map //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline get_stored_allocator_const_return_t get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { impl_get_stored_allocator_const_return_t r = m_flat_tree.get_stored_allocator(); @@ -549,7 +549,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator begin() BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.begin()); } @@ -558,7 +558,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.begin()); } @@ -567,7 +567,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator end() BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.end()); } @@ -576,7 +576,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.end()); } @@ -586,7 +586,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.rbegin()); } @@ -596,7 +596,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.rbegin()); } @@ -606,7 +606,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.rend()); } @@ -616,7 +616,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.rend()); } @@ -625,7 +625,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.cbegin()); } @@ -634,7 +634,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.cend()); } @@ -644,7 +644,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.crbegin()); } @@ -654,7 +654,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.crend()); } @@ -669,7 +669,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool empty() const BOOST_NOEXCEPT_OR_NOTHROW { return m_flat_tree.empty(); } @@ -678,7 +678,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type size() const BOOST_NOEXCEPT_OR_NOTHROW { return m_flat_tree.size(); } @@ -687,7 +687,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW { return m_flat_tree.max_size(); } @@ -697,7 +697,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW { return m_flat_tree.capacity(); } @@ -711,7 +711,7 @@ class flat_map //! //! Note: If capacity() is less than "cnt", iterators and references to //! to values might be invalidated. - BOOST_CONTAINER_FORCEINLINE void reserve(size_type cnt) + inline void reserve(size_type cnt) { m_flat_tree.reserve(cnt); } //! Effects: Tries to deallocate the excess of memory created @@ -720,7 +720,7 @@ class flat_map //! Throws: If memory allocation throws, or T's copy constructor throws. //! //! Complexity: Linear to size(). - BOOST_CONTAINER_FORCEINLINE void shrink_to_fit() + inline void shrink_to_fit() { m_flat_tree.shrink_to_fit(); } ////////////////////////////////////////////// @@ -747,8 +747,8 @@ class flat_map mapped_type &operator[](key_type &&k); #elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN) //in compilers like GCC 3.4, we can't catch temporaries - BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); } - BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); } + inline mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); } + inline mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); } #else BOOST_MOVE_CONVERSION_AWARE_CATCH( operator[] , key_type, mapped_type&, this->priv_subscript) #endif @@ -766,7 +766,7 @@ class flat_map //! //! Complexity: Logarithmic search time plus linear insertion time in case no equivalent key is present. template - BOOST_CONTAINER_FORCEINLINE std::pair insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj) + inline std::pair insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj) { return dtl::force_copy< std::pair > (this->m_flat_tree.insert_or_assign @@ -787,7 +787,7 @@ class flat_map //! //! Complexity: Logarithmic in the size of the container. template - BOOST_CONTAINER_FORCEINLINE std::pair insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj) + inline std::pair insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj) { return dtl::force_copy< std::pair > (this->m_flat_tree.insert_or_assign @@ -810,7 +810,7 @@ class flat_map //! Complexity: Logarithmic in the size of the container in general, but amortized constant if //! the new element is inserted just before hint. template - BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj) + inline iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj) { return dtl::force_copy (this->m_flat_tree.insert_or_assign @@ -834,7 +834,7 @@ class flat_map //! Complexity: Logarithmic in the size of the container in general, but amortized constant if //! the new element is inserted just before hint. template - BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj) + inline iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj) { return dtl::force_copy (this->m_flat_tree.insert_or_assign @@ -844,22 +844,22 @@ class flat_map } //! @copydoc ::boost::container::flat_set::nth(size_type) - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.nth(n)); } //! @copydoc ::boost::container::flat_set::nth(size_type) const - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.nth(n)); } //! @copydoc ::boost::container::flat_set::index_of(iterator) - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW { return m_flat_tree.index_of(dtl::force_copy(p)); } //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW { return m_flat_tree.index_of(dtl::force_copy(p)); } @@ -912,7 +912,7 @@ class flat_map //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_FWD_REF(Args)... args) + inline std::pair emplace(BOOST_FWD_REF(Args)... args) { return dtl::force_copy< std::pair >(m_flat_tree.emplace_unique(boost::forward(args)...)); } //! Effects: Inserts an object of type T constructed with @@ -928,7 +928,7 @@ class flat_map //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args) + inline iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args) { return dtl::force_copy (m_flat_tree.emplace_hint_unique( dtl::force_copy(hint) @@ -947,7 +947,7 @@ class flat_map //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args) + inline std::pair try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args) { return dtl::force_copy< std::pair >( m_flat_tree.try_emplace(impl_const_iterator(), k, boost::forward(args)...)); @@ -965,7 +965,7 @@ class flat_map //! Complexity: Logarithmic in general, but amortized constant if value //! is inserted right before p. template - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args) + inline iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args) { return dtl::force_copy(m_flat_tree.try_emplace (dtl::force_copy(hint), k, boost::forward(args)...).first); @@ -983,7 +983,7 @@ class flat_map //! //! Complexity: Logarithmic search time plus linear insertion time in case the key is not present. template - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args) + inline std::pair try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args) { return dtl::force_copy< std::pair > (m_flat_tree.try_emplace(impl_const_iterator(), boost::move(k), boost::forward(args)...)); @@ -1001,7 +1001,7 @@ class flat_map //! Complexity: Logarithmic in general, but amortized constant if value //! is inserted right before p. Linear insertion time in case no equivalent key is present. template - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args) + inline iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args) { return dtl::force_copy (m_flat_tree.try_emplace(dtl::force_copy @@ -1012,39 +1012,39 @@ class flat_map #define BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE(N) \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_MOVE_UREF##N)\ + inline std::pair emplace(BOOST_MOVE_UREF##N)\ {\ return dtl::force_copy< std::pair >\ (m_flat_tree.emplace_unique(BOOST_MOVE_FWD##N));\ }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ {\ return dtl::force_copy(m_flat_tree.emplace_hint_unique\ (dtl::force_copy(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\ }\ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline std::pair try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ {\ return dtl::force_copy< std::pair >\ (m_flat_tree.try_emplace(impl_const_iterator(), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\ }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { return dtl::force_copy(m_flat_tree.try_emplace\ (dtl::force_copy(hint), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline std::pair try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ {\ return dtl::force_copy< std::pair >\ (m_flat_tree.try_emplace(impl_const_iterator(), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\ }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { return dtl::force_copy(m_flat_tree.try_emplace\ (dtl::force_copy(hint), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\ // @@ -1064,7 +1064,7 @@ class flat_map //! to the elements with bigger keys than x. //! //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE std::pair insert(const value_type& x) + inline std::pair insert(const value_type& x) { return dtl::force_copy >( m_flat_tree.insert_unique(dtl::force(x))); } @@ -1079,7 +1079,7 @@ class flat_map //! to the elements with bigger keys than x. //! //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE std::pair insert(BOOST_RV_REF(value_type) x) + inline std::pair insert(BOOST_RV_REF(value_type) x) { return dtl::force_copy >( m_flat_tree.insert_unique(boost::move(dtl::force(x)))); @@ -1097,7 +1097,7 @@ class flat_map //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_DOC1ST + inline BOOST_CONTAINER_DOC1ST ( std::pair , typename dtl::enable_if_c::value BOOST_MOVE_I std::pair >::type) @@ -1118,7 +1118,7 @@ class flat_map //! right before p) plus insertion linear to the elements with bigger keys than x. //! //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x) + inline iterator insert(const_iterator p, const value_type& x) { return dtl::force_copy( m_flat_tree.insert_unique( dtl::force_copy(p) @@ -1134,7 +1134,7 @@ class flat_map //! right before p) plus insertion linear to the elements with bigger keys than x. //! //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x) + inline iterator insert(const_iterator p, BOOST_RV_REF(value_type) x) { return dtl::force_copy (m_flat_tree.insert_unique( dtl::force_copy(p) @@ -1151,7 +1151,7 @@ class flat_map //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_DOC1ST + inline BOOST_CONTAINER_DOC1ST ( iterator , typename dtl::enable_if_c::value BOOST_MOVE_I iterator>::type) @@ -1170,7 +1170,7 @@ class flat_map //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) + inline void insert(InputIterator first, InputIterator last) { m_flat_tree.insert_unique(first, last); } //! Requires: first, last are not iterators into *this. @@ -1188,7 +1188,7 @@ class flat_map //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, InputIterator first, InputIterator last) + inline void insert(ordered_unique_range_t, InputIterator first, InputIterator last) { m_flat_tree.insert_unique(ordered_unique_range, first, last); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) @@ -1198,7 +1198,7 @@ class flat_map //! Complexity: N log(N). //! //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) + inline void insert(std::initializer_list il) { m_flat_tree.insert_unique( dtl::force(il).begin() , dtl::force(il).end()); @@ -1216,7 +1216,7 @@ class flat_map //! Note: If an element is inserted it might invalidate elements. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, std::initializer_list il) + inline void insert(ordered_unique_range_t, std::initializer_list il) { m_flat_tree.insert_unique(ordered_unique_range , dtl::force(il).begin() @@ -1234,22 +1234,22 @@ class flat_map //! //! Note: Invalidates all iterators and references. template - BOOST_CONTAINER_FORCEINLINE void merge(flat_map& source) + inline void merge(flat_map& source) { m_flat_tree.merge_unique(source.tree()); } //! @copydoc ::boost::container::flat_map::merge(flat_map&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_map BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG flat_map BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } //! @copydoc ::boost::container::flat_map::merge(flat_map&) template - BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap& source) + inline void merge(flat_multimap& source) { m_flat_tree.merge_unique(source.tree()); } //! @copydoc ::boost::container::flat_map::merge(flat_map&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multimap BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG flat_multimap BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } //! Effects: Erases the element pointed to by p. @@ -1262,7 +1262,7 @@ class flat_map //! //! Note: Invalidates elements with keys //! not less than the erased element. - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p) + inline iterator erase(const_iterator p) { return dtl::force_copy (m_flat_tree.erase(dtl::force_copy(p))); @@ -1274,7 +1274,7 @@ class flat_map //! //! Complexity: Logarithmic search time plus erasure time //! linear to the elements with bigger keys. - BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x) + inline size_type erase(const key_type& x) { return m_flat_tree.erase_unique(x); } //! Effects: Erases all the elements in the range [first, last). @@ -1285,7 +1285,7 @@ class flat_map //! //! Complexity: Logarithmic search time plus erasure time //! linear to the elements with bigger keys. - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last) + inline iterator erase(const_iterator first, const_iterator last) { return dtl::force_copy( m_flat_tree.erase( dtl::force_copy(first) @@ -1297,7 +1297,7 @@ class flat_map //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE void swap(flat_map& x) + inline void swap(flat_map& x) BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value && boost::container::dtl::is_nothrow_swappable::value ) { m_flat_tree.swap(x.m_flat_tree); } @@ -1307,7 +1307,7 @@ class flat_map //! Postcondition: size() == 0. //! //! Complexity: linear in size(). - BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW + inline void clear() BOOST_NOEXCEPT_OR_NOTHROW { m_flat_tree.clear(); } ////////////////////////////////////////////// @@ -1320,7 +1320,7 @@ class flat_map //! of which a was constructed. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline key_compare key_comp() const { return dtl::force_copy(m_flat_tree.key_comp()); } @@ -1328,7 +1328,7 @@ class flat_map //! of the comparison object. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline value_compare value_comp() const { return value_compare(dtl::force_copy(m_flat_tree.key_comp())); } @@ -1342,7 +1342,7 @@ class flat_map //! equivalent to x, or end() if such an element is not found. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator find(const key_type& x) { return dtl::force_copy(m_flat_tree.find(x)); } @@ -1350,7 +1350,7 @@ class flat_map //! equivalent to x, or end() if such an element is not found. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator find(const key_type& x) const { return dtl::force_copy(m_flat_tree.find(x)); } @@ -1362,7 +1362,7 @@ class flat_map //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator find(const K& x) { return dtl::force_copy(m_flat_tree.find(x)); } @@ -1374,14 +1374,14 @@ class flat_map //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator find(const K& x) const { return dtl::force_copy(m_flat_tree.find(x)); } //! Returns: The number of elements with key equivalent to x. //! //! Complexity: log(size())+count(k) - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type count(const key_type& x) const { return static_cast(m_flat_tree.find(x) != m_flat_tree.end()); } @@ -1392,7 +1392,7 @@ class flat_map //! //! Complexity: log(size())+count(k) template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type count(const K& x) const //Don't use find() != end optimization here as transparent comparators with key K might //return a different range than key_type (which can only return a single element range) @@ -1402,7 +1402,7 @@ class flat_map //! equivalent to key in the container, otherwise false. //! //! Complexity: log(size()). - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool contains(const key_type& x) const { return m_flat_tree.find(x) != m_flat_tree.end(); } @@ -1414,7 +1414,7 @@ class flat_map //! //! Complexity: log(size()). template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool contains(const K& x) const { return m_flat_tree.find(x) != m_flat_tree.end(); } @@ -1422,7 +1422,7 @@ class flat_map //! than x, or end() if such an element is not found. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator lower_bound(const key_type& x) { return dtl::force_copy(m_flat_tree.lower_bound(x)); } @@ -1430,7 +1430,7 @@ class flat_map //! less than x, or end() if such an element is not found. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator lower_bound(const key_type& x) const { return dtl::force_copy(m_flat_tree.lower_bound(x)); } @@ -1442,7 +1442,7 @@ class flat_map //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator lower_bound(const K& x) { return dtl::force_copy(m_flat_tree.lower_bound(x)); } @@ -1454,7 +1454,7 @@ class flat_map //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator lower_bound(const K& x) const { return dtl::force_copy(m_flat_tree.lower_bound(x)); } @@ -1462,7 +1462,7 @@ class flat_map //! than x, or end() if such an element is not found. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator upper_bound(const key_type& x) { return dtl::force_copy(m_flat_tree.upper_bound(x)); } @@ -1470,7 +1470,7 @@ class flat_map //! greater than x, or end() if such an element is not found. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator upper_bound(const key_type& x) const { return dtl::force_copy(m_flat_tree.upper_bound(x)); } @@ -1482,7 +1482,7 @@ class flat_map //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator upper_bound(const K& x) { return dtl::force_copy(m_flat_tree.upper_bound(x)); } @@ -1494,21 +1494,21 @@ class flat_map //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator upper_bound(const K& x) const { return dtl::force_copy(m_flat_tree.upper_bound(x)); } //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). //! //! Complexity: Logarithmic. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair equal_range(const key_type& x) { return dtl::force_copy >(m_flat_tree.lower_bound_range(x)); } //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). //! //! Complexity: Logarithmic. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair equal_range(const key_type& x) const { return dtl::force_copy >(m_flat_tree.lower_bound_range(x)); } @@ -1519,7 +1519,7 @@ class flat_map //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair equal_range(const K& x) //Don't use lower_bound_range optimization here as transparent comparators with key K might //return a different range than key_type (which can only return a single element range) @@ -1532,7 +1532,7 @@ class flat_map //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair equal_range(const K& x) const //Don't use lower_bound_range optimization here as transparent comparators with key K might //return a different range than key_type (which can only return a single element range) @@ -1545,7 +1545,7 @@ class flat_map //! Postcondition: this->empty() //! //! Throws: If secuence_type's move constructor throws - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence() + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline sequence_type extract_sequence() { return boost::move(dtl::force(m_flat_tree.get_sequence_ref())); } @@ -1556,7 +1556,7 @@ class flat_map //! Complexity: Assuming O(1) move assignment, O(NlogN) with N = seq.size() //! //! Throws: If the comparison or the move constructor throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq) + inline void adopt_sequence(BOOST_RV_REF(sequence_type) seq) { this->m_flat_tree.adopt_sequence_unique(boost::move(dtl::force(seq))); } //! Requires: seq shall be ordered according to this->compare() @@ -1568,7 +1568,7 @@ class flat_map //! Complexity: Assuming O(1) move assignment, O(1) //! //! Throws: If the move assignment throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq) + inline void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq) { this->m_flat_tree.adopt_sequence_unique(ordered_unique_range_t(), boost::move(dtl::force(seq))); } //! Effects: Returns a const view of the underlying sequence. @@ -1576,55 +1576,55 @@ class flat_map //! Complexity: Constant //! //! Throws: Nothing - BOOST_CONTAINER_FORCEINLINE const sequence_type & sequence() const BOOST_NOEXCEPT + inline const sequence_type & sequence() const BOOST_NOEXCEPT { return dtl::force(m_flat_tree.get_sequence_cref()); } //! Effects: Returns true if x and y are equal //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator==(const flat_map& x, const flat_map& y) { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } //! Effects: Returns true if x and y are unequal //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator!=(const flat_map& x, const flat_map& y) { return !(x == y); } //! Effects: Returns true if x is less than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<(const flat_map& x, const flat_map& y) { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } //! Effects: Returns true if x is greater than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>(const flat_map& x, const flat_map& y) { return y < x; } //! Effects: Returns true if x is equal or less than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<=(const flat_map& x, const flat_map& y) { return !(y < x); } //! Effects: Returns true if x is equal or greater than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>=(const flat_map& x, const flat_map& y) { return !(x < y); } //! Effects: x.swap(y) //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE friend void swap(flat_map& x, flat_map& y) + inline friend void swap(flat_map& x, flat_map& y) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y))) { x.swap(y); } @@ -1812,10 +1812,10 @@ class flat_multimap typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type; typedef typename impl_tree_t::sequence_type impl_sequence_type; - BOOST_CONTAINER_FORCEINLINE impl_tree_t &tree() + inline impl_tree_t &tree() { return m_flat_tree; } - BOOST_CONTAINER_FORCEINLINE const impl_tree_t &tree() const + inline const impl_tree_t &tree() const { return m_flat_tree; } private: @@ -1862,7 +1862,7 @@ class flat_multimap //! Effects: Default constructs an empty flat_map. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE flat_multimap() + inline flat_multimap() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value && dtl::is_nothrow_default_constructible::value) : m_flat_tree() @@ -1871,7 +1871,7 @@ class flat_multimap //! Effects: Constructs an empty flat_multimap using the specified allocator. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit flat_multimap(const allocator_type& a) + inline explicit flat_multimap(const allocator_type& a) : m_flat_tree(dtl::force(a)) {} @@ -1879,7 +1879,7 @@ class flat_multimap //! object . //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit flat_multimap(const Compare& comp) + inline explicit flat_multimap(const Compare& comp) : m_flat_tree(comp) {} @@ -1887,7 +1887,7 @@ class flat_multimap //! object and allocator. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(const Compare& comp, const allocator_type& a) : m_flat_tree(comp, dtl::force(a)) {} @@ -1898,7 +1898,7 @@ class flat_multimap //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(InputIterator first, InputIterator last) : m_flat_tree(false, first, last) {} @@ -1909,7 +1909,7 @@ class flat_multimap //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(InputIterator first, InputIterator last, const allocator_type& a) : m_flat_tree(false, first, last, dtl::force(a)) {} @@ -1920,7 +1920,7 @@ class flat_multimap //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(InputIterator first, InputIterator last, const Compare& comp) : m_flat_tree(false, first, last, comp) {} @@ -1931,7 +1931,7 @@ class flat_multimap //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : m_flat_tree(false, first, last, comp, dtl::force(a)) {} @@ -1946,7 +1946,7 @@ class flat_multimap //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(ordered_range_t, InputIterator first, InputIterator last) : m_flat_tree(ordered_range, first, last) {} @@ -1961,7 +1961,7 @@ class flat_multimap //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) : m_flat_tree(ordered_range, first, last, comp) {} @@ -1976,7 +1976,7 @@ class flat_multimap //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : m_flat_tree(ordered_range, first, last, comp, a) {} @@ -1991,7 +1991,7 @@ class flat_multimap //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const allocator_type &a) : m_flat_tree(ordered_range, first, last, Compare(), a) {} @@ -2002,7 +2002,7 @@ class flat_multimap //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(std::initializer_list il) : m_flat_tree( false , dtl::force(il).begin() @@ -2014,7 +2014,7 @@ class flat_multimap //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(std::initializer_list il, const allocator_type& a) : m_flat_tree(false , dtl::force(il).begin() @@ -2027,7 +2027,7 @@ class flat_multimap //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(std::initializer_list il, const Compare& comp) : m_flat_tree(false , dtl::force(il).begin() @@ -2039,7 +2039,7 @@ class flat_multimap //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(std::initializer_list il, const Compare& comp, const allocator_type& a) : m_flat_tree( false , dtl::force(il).begin() @@ -2056,7 +2056,7 @@ class flat_multimap //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(ordered_range_t, std::initializer_list il) : m_flat_tree( ordered_range , dtl::force(il).begin() @@ -2072,7 +2072,7 @@ class flat_multimap //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(ordered_range_t, std::initializer_list il, const Compare& comp) : m_flat_tree( ordered_range , dtl::force(il).begin() @@ -2088,7 +2088,7 @@ class flat_multimap //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(ordered_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) : m_flat_tree( ordered_range , dtl::force(il).begin() @@ -2100,7 +2100,7 @@ class flat_multimap //! Effects: Copy constructs a flat_multimap. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(const flat_multimap& x) : m_flat_tree(x.m_flat_tree) {} @@ -2110,7 +2110,7 @@ class flat_multimap //! Complexity: Constant. //! //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(BOOST_RV_REF(flat_multimap) x) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : m_flat_tree(boost::move(x.m_flat_tree)) @@ -2119,7 +2119,7 @@ class flat_multimap //! Effects: Copy constructs a flat_multimap using the specified allocator. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(const flat_multimap& x, const allocator_type &a) : m_flat_tree(x.m_flat_tree, dtl::force(a)) {} @@ -2128,7 +2128,7 @@ class flat_multimap //! Constructs *this using x's resources. //! //! Complexity: Constant if a == x.get_allocator(), linear otherwise. - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap(BOOST_RV_REF(flat_multimap) x, const allocator_type &a) : m_flat_tree(boost::move(x.m_flat_tree), dtl::force(a)) {} @@ -2136,14 +2136,14 @@ class flat_multimap //! Effects: Makes *this a copy of x. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap& operator=(BOOST_COPY_ASSIGN_REF(flat_multimap) x) { m_flat_tree = x.m_flat_tree; return *this; } //! Effects: this->swap(x.get()). //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap& operator=(BOOST_RV_REF(flat_multimap) x) BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || allocator_traits_type::is_always_equal::value) && @@ -2154,7 +2154,7 @@ class flat_multimap //! Effects: Assign content of il to *this //! //! Complexity: Linear in il.size(). - BOOST_CONTAINER_FORCEINLINE + inline flat_multimap& operator=(std::initializer_list il) { this->clear(); @@ -2167,7 +2167,7 @@ class flat_multimap //! was passed to the object's constructor. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.get_allocator()); } @@ -2178,7 +2178,7 @@ class flat_multimap //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force(m_flat_tree.get_stored_allocator()); } @@ -2189,7 +2189,7 @@ class flat_multimap //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force(m_flat_tree.get_stored_allocator()); } @@ -2204,7 +2204,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator begin() BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.begin()); } @@ -2213,7 +2213,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.begin()); } @@ -2222,7 +2222,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator end() BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.end()); } @@ -2231,7 +2231,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.end()); } @@ -2241,7 +2241,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.rbegin()); } @@ -2251,7 +2251,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.rbegin()); } @@ -2261,7 +2261,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.rend()); } @@ -2271,7 +2271,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.rend()); } @@ -2280,7 +2280,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.cbegin()); } @@ -2289,7 +2289,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.cend()); } @@ -2299,7 +2299,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.crbegin()); } @@ -2309,7 +2309,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.crend()); } @@ -2324,7 +2324,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool empty() const BOOST_NOEXCEPT_OR_NOTHROW { return m_flat_tree.empty(); } @@ -2333,7 +2333,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type size() const BOOST_NOEXCEPT_OR_NOTHROW { return m_flat_tree.size(); } @@ -2342,7 +2342,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW { return m_flat_tree.max_size(); } @@ -2352,7 +2352,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW { return m_flat_tree.capacity(); } @@ -2366,7 +2366,7 @@ class flat_multimap //! //! Note: If capacity() is less than "cnt", iterators and references to //! to values might be invalidated. - BOOST_CONTAINER_FORCEINLINE + inline void reserve(size_type cnt) { m_flat_tree.reserve(cnt); } @@ -2376,27 +2376,27 @@ class flat_multimap //! Throws: If memory allocation throws, or T's copy constructor throws. //! //! Complexity: Linear to size(). - BOOST_CONTAINER_FORCEINLINE + inline void shrink_to_fit() { m_flat_tree.shrink_to_fit(); } //! @copydoc ::boost::container::flat_set::nth(size_type) - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.nth(n)); } //! @copydoc ::boost::container::flat_set::nth(size_type) const - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW { return dtl::force_copy(m_flat_tree.nth(n)); } //! @copydoc ::boost::container::flat_set::index_of(iterator) - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW { return m_flat_tree.index_of(dtl::force_copy(p)); } //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW { return m_flat_tree.index_of(dtl::force_copy(p)); } @@ -2411,7 +2411,7 @@ class flat_multimap //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE + inline iterator emplace(BOOST_FWD_REF(Args)... args) { return dtl::force_copy(m_flat_tree.emplace_equal(boost::forward(args)...)); } @@ -2428,7 +2428,7 @@ class flat_multimap //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE + inline iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args) { return dtl::force_copy(m_flat_tree.emplace_hint_equal @@ -2439,11 +2439,11 @@ class flat_multimap #define BOOST_CONTAINER_FLAT_MULTIMAP_EMPLACE_CODE(N) \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\ + inline iterator emplace(BOOST_MOVE_UREF##N)\ { return dtl::force_copy(m_flat_tree.emplace_equal(BOOST_MOVE_FWD##N)); }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ {\ return dtl::force_copy(m_flat_tree.emplace_hint_equal\ (dtl::force_copy(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\ @@ -2461,7 +2461,7 @@ class flat_multimap //! to the elements with bigger keys than x. //! //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(const value_type& x) + inline iterator insert(const value_type& x) { return dtl::force_copy( m_flat_tree.insert_equal(dtl::force(x))); @@ -2475,7 +2475,7 @@ class flat_multimap //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_DOC1ST + inline BOOST_CONTAINER_DOC1ST ( iterator , typename dtl::enable_if_c::value BOOST_MOVE_I iterator >::type) @@ -2493,7 +2493,7 @@ class flat_multimap //! to the elements with bigger keys than x. //! //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x) + inline iterator insert(const_iterator p, const value_type& x) { return dtl::force_copy (m_flat_tree.insert_equal( dtl::force_copy(p) @@ -2512,7 +2512,7 @@ class flat_multimap //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_DOC1ST + inline BOOST_CONTAINER_DOC1ST ( iterator , typename dtl::enable_if_c::value BOOST_MOVE_I iterator>::type) @@ -2530,7 +2530,7 @@ class flat_multimap //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) + inline void insert(InputIterator first, InputIterator last) { m_flat_tree.insert_equal(first, last); } //! Requires: first, last are not iterators into *this. @@ -2547,7 +2547,7 @@ class flat_multimap //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, InputIterator first, InputIterator last) + inline void insert(ordered_range_t, InputIterator first, InputIterator last) { m_flat_tree.insert_equal(ordered_range, first, last); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) @@ -2556,7 +2556,7 @@ class flat_multimap //! Complexity: N log(N). //! //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) + inline void insert(std::initializer_list il) { m_flat_tree.insert_equal( dtl::force(il).begin() , dtl::force(il).end()); @@ -2573,7 +2573,7 @@ class flat_multimap //! Note: If an element is inserted it might invalidate elements. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, std::initializer_list il) + inline void insert(ordered_range_t, std::initializer_list il) { m_flat_tree.insert_equal( ordered_range , dtl::force(il).begin() @@ -2590,22 +2590,22 @@ class flat_multimap //! //! Note: Invalidates all iterators and references. template - BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap& source) + inline void merge(flat_multimap& source) { m_flat_tree.merge_equal(source.tree()); } //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multimap BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG flat_multimap BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap&) template - BOOST_CONTAINER_FORCEINLINE void merge(flat_map& source) + inline void merge(flat_map& source) { m_flat_tree.merge_equal(source.tree()); } //! @copydoc ::boost::container::flat_multimap::merge(flat_map&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_map BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG flat_map BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } //! Effects: Erases the element pointed to by p. @@ -2618,7 +2618,7 @@ class flat_multimap //! //! Note: Invalidates elements with keys //! not less than the erased element. - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p) + inline iterator erase(const_iterator p) { return dtl::force_copy( m_flat_tree.erase(dtl::force_copy(p))); @@ -2630,7 +2630,7 @@ class flat_multimap //! //! Complexity: Logarithmic search time plus erasure time //! linear to the elements with bigger keys. - BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x) + inline size_type erase(const key_type& x) { return m_flat_tree.erase(x); } //! Effects: Erases all the elements in the range [first, last). @@ -2641,7 +2641,7 @@ class flat_multimap //! //! Complexity: Logarithmic search time plus erasure time //! linear to the elements with bigger keys. - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last) + inline iterator erase(const_iterator first, const_iterator last) { return dtl::force_copy (m_flat_tree.erase( dtl::force_copy(first) @@ -2653,7 +2653,7 @@ class flat_multimap //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE void swap(flat_multimap& x) + inline void swap(flat_multimap& x) BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value && boost::container::dtl::is_nothrow_swappable::value ) { m_flat_tree.swap(x.m_flat_tree); } @@ -2663,7 +2663,7 @@ class flat_multimap //! Postcondition: size() == 0. //! //! Complexity: linear in size(). - BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW + inline void clear() BOOST_NOEXCEPT_OR_NOTHROW { m_flat_tree.clear(); } ////////////////////////////////////////////// @@ -2676,7 +2676,7 @@ class flat_multimap //! of which a was constructed. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline key_compare key_comp() const { return dtl::force_copy(m_flat_tree.key_comp()); } @@ -2684,7 +2684,7 @@ class flat_multimap //! of the comparison object. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline value_compare value_comp() const { return value_compare(dtl::force_copy(m_flat_tree.key_comp())); } @@ -2698,7 +2698,7 @@ class flat_multimap //! equivalent to x, or end() if such an element is not found. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator find(const key_type& x) { return dtl::force_copy(m_flat_tree.find(x)); } @@ -2706,7 +2706,7 @@ class flat_multimap //! equivalent to x, or end() if such an element is not found. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator find(const key_type& x) const { return dtl::force_copy(m_flat_tree.find(x)); } @@ -2718,7 +2718,7 @@ class flat_multimap //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator find(const K& x) { return dtl::force_copy(m_flat_tree.find(x)); } @@ -2730,14 +2730,14 @@ class flat_multimap //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator find(const K& x) const { return dtl::force_copy(m_flat_tree.find(x)); } //! Returns: The number of elements with key equivalent to x. //! //! Complexity: log(size())+count(k) - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type count(const key_type& x) const { return m_flat_tree.count(x); } @@ -2748,7 +2748,7 @@ class flat_multimap //! //! Complexity: log(size())+count(k) template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type count(const K& x) const { return m_flat_tree.count(x); } @@ -2756,7 +2756,7 @@ class flat_multimap //! equivalent to key in the container, otherwise false. //! //! Complexity: log(size()). - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool contains(const key_type& x) const { return m_flat_tree.find(x) != m_flat_tree.end(); } @@ -2768,7 +2768,7 @@ class flat_multimap //! //! Complexity: log(size()). template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool contains(const K& x) const { return m_flat_tree.find(x) != m_flat_tree.end(); } @@ -2776,7 +2776,7 @@ class flat_multimap //! than x, or end() if such an element is not found. //! //! Complexity: Logarithmic - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator lower_bound(const key_type& x) { return dtl::force_copy(m_flat_tree.lower_bound(x)); } @@ -2784,7 +2784,7 @@ class flat_multimap //! than x, or end() if such an element is not found. //! //! Complexity: Logarithmic - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator lower_bound(const key_type& x) const { return dtl::force_copy(m_flat_tree.lower_bound(x)); } @@ -2796,7 +2796,7 @@ class flat_multimap //! //! Complexity: Logarithmic template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator lower_bound(const K& x) { return dtl::force_copy(m_flat_tree.lower_bound(x)); } @@ -2808,7 +2808,7 @@ class flat_multimap //! //! Complexity: Logarithmic template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator lower_bound(const K& x) const { return dtl::force_copy(m_flat_tree.lower_bound(x)); } @@ -2816,7 +2816,7 @@ class flat_multimap //! than x, or end() if such an element is not found. //! //! Complexity: Logarithmic - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator upper_bound(const key_type& x) {return dtl::force_copy(m_flat_tree.upper_bound(x)); } @@ -2824,7 +2824,7 @@ class flat_multimap //! greater than x, or end() if such an element is not found. //! //! Complexity: Logarithmic - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator upper_bound(const key_type& x) const { return dtl::force_copy(m_flat_tree.upper_bound(x)); } @@ -2836,7 +2836,7 @@ class flat_multimap //! //! Complexity: Logarithmic template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator upper_bound(const K& x) {return dtl::force_copy(m_flat_tree.upper_bound(x)); } @@ -2848,21 +2848,21 @@ class flat_multimap //! //! Complexity: Logarithmic template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator upper_bound(const K& x) const { return dtl::force_copy(m_flat_tree.upper_bound(x)); } //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). //! //! Complexity: Logarithmic - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair equal_range(const key_type& x) { return dtl::force_copy >(m_flat_tree.equal_range(x)); } //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). //! //! Complexity: Logarithmic - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair equal_range(const key_type& x) const { return dtl::force_copy >(m_flat_tree.equal_range(x)); } @@ -2873,7 +2873,7 @@ class flat_multimap //! //! Complexity: Logarithmic template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair equal_range(const K& x) { return dtl::force_copy >(m_flat_tree.equal_range(x)); } @@ -2884,7 +2884,7 @@ class flat_multimap //! //! Complexity: Logarithmic template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline std::pair equal_range(const K& x) const { return dtl::force_copy >(m_flat_tree.equal_range(x)); } @@ -2895,7 +2895,7 @@ class flat_multimap //! Postcondition: this->empty() //! //! Throws: If secuence_type's move constructor throws - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline sequence_type extract_sequence() { return boost::move(dtl::force(m_flat_tree.get_sequence_ref())); } @@ -2905,7 +2905,7 @@ class flat_multimap //! Complexity: Assuming O(1) move assignment, O(NlogN) with N = seq.size() //! //! Throws: If the comparison or the move constructor throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq) + inline void adopt_sequence(BOOST_RV_REF(sequence_type) seq) { this->m_flat_tree.adopt_sequence_equal(boost::move(dtl::force(seq))); } //! Requires: seq shall be ordered according to this->compare(). @@ -2916,7 +2916,7 @@ class flat_multimap //! Complexity: Assuming O(1) move assignment, O(1) //! //! Throws: If the move assignment throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq) + inline void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq) { this->m_flat_tree.adopt_sequence_equal(ordered_range_t(), boost::move(dtl::force(seq))); } //! Effects: Returns a const view of the underlying sequence. @@ -2924,55 +2924,55 @@ class flat_multimap //! Complexity: Constant //! //! Throws: Nothing - BOOST_CONTAINER_FORCEINLINE const sequence_type & sequence() const BOOST_NOEXCEPT + inline const sequence_type & sequence() const BOOST_NOEXCEPT { return dtl::force(m_flat_tree.get_sequence_cref()); } //! Effects: Returns true if x and y are equal //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator==(const flat_multimap& x, const flat_multimap& y) { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } //! Effects: Returns true if x and y are unequal //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator!=(const flat_multimap& x, const flat_multimap& y) { return !(x == y); } //! Effects: Returns true if x is less than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<(const flat_multimap& x, const flat_multimap& y) { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } //! Effects: Returns true if x is greater than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>(const flat_multimap& x, const flat_multimap& y) { return y < x; } //! Effects: Returns true if x is equal or less than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<=(const flat_multimap& x, const flat_multimap& y) { return !(y < x); } //! Effects: Returns true if x is equal or greater than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>=(const flat_multimap& x, const flat_multimap& y) { return !(x < y); } //! Effects: x.swap(y) //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE friend void swap(flat_multimap& x, flat_multimap& y) + inline friend void swap(flat_multimap& x, flat_multimap& y) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y))) { x.swap(y); } }; diff --git a/include/boost/container/flat_set.hpp b/include/boost/container/flat_set.hpp index 7a4ed48..0c02dab 100644 --- a/include/boost/container/flat_set.hpp +++ b/include/boost/container/flat_set.hpp @@ -133,7 +133,7 @@ class flat_set //! Effects: Default constructs an empty container. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE + inline flat_set() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value && dtl::is_nothrow_default_constructible::value) : tree_t() @@ -143,7 +143,7 @@ class flat_set //! comparison object. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE + inline explicit flat_set(const Compare& comp) : tree_t(comp) {} @@ -151,7 +151,7 @@ class flat_set //! Effects: Constructs an empty container using the specified allocator. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE + inline explicit flat_set(const allocator_type& a) : tree_t(a) {} @@ -160,7 +160,7 @@ class flat_set //! comparison object and allocator. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE + inline flat_set(const Compare& comp, const allocator_type& a) : tree_t(comp, a) {} @@ -171,7 +171,7 @@ class flat_set //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! comp and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE + inline flat_set(InputIterator first, InputIterator last) : tree_t(true, first, last) {} @@ -182,7 +182,7 @@ class flat_set //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! comp and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE + inline flat_set(InputIterator first, InputIterator last, const allocator_type& a) : tree_t(true, first, last, a) {} @@ -193,7 +193,7 @@ class flat_set //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! comp and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE + inline flat_set(InputIterator first, InputIterator last, const Compare& comp) : tree_t(true, first, last, comp) {} @@ -204,7 +204,7 @@ class flat_set //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! comp and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE + inline flat_set(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : tree_t(true, first, last, comp, a) {} @@ -220,7 +220,7 @@ class flat_set //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE + inline flat_set(ordered_unique_range_t, InputIterator first, InputIterator last) : tree_t(ordered_unique_range, first, last) {} @@ -236,7 +236,7 @@ class flat_set //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE + inline flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp) : tree_t(ordered_unique_range, first, last, comp) {} @@ -252,7 +252,7 @@ class flat_set //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE + inline flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : tree_t(ordered_unique_range, first, last, comp, a) {} @@ -268,7 +268,7 @@ class flat_set //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE + inline flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const allocator_type& a) : tree_t(ordered_unique_range, first, last, Compare(), a) {} @@ -279,7 +279,7 @@ class flat_set //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! comp and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list il) + inline flat_set(std::initializer_list il) : tree_t(true, il.begin(), il.end()) {} @@ -288,7 +288,7 @@ class flat_set //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! comp and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list il, const allocator_type& a) + inline flat_set(std::initializer_list il, const allocator_type& a) : tree_t(true, il.begin(), il.end(), a) {} @@ -297,7 +297,7 @@ class flat_set //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! comp and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list il, const Compare& comp) + inline flat_set(std::initializer_list il, const Compare& comp) : tree_t(true, il.begin(), il.end(), comp) {} @@ -306,7 +306,7 @@ class flat_set //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! comp and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list il, const Compare& comp, const allocator_type& a) + inline flat_set(std::initializer_list il, const Compare& comp, const allocator_type& a) : tree_t(true, il.begin(), il.end(), comp, a) {} @@ -320,7 +320,7 @@ class flat_set //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list il) + inline flat_set(ordered_unique_range_t, std::initializer_list il) : tree_t(ordered_unique_range, il.begin(), il.end()) {} @@ -334,7 +334,7 @@ class flat_set //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list il, const Compare& comp) + inline flat_set(ordered_unique_range_t, std::initializer_list il, const Compare& comp) : tree_t(ordered_unique_range, il.begin(), il.end(), comp) {} @@ -348,7 +348,7 @@ class flat_set //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) + inline flat_set(ordered_unique_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) : tree_t(ordered_unique_range, il.begin(), il.end(), comp, a) {} #endif @@ -356,7 +356,7 @@ class flat_set //! Effects: Copy constructs the container. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE flat_set(const flat_set& x) + inline flat_set(const flat_set& x) : tree_t(static_cast(x)) {} @@ -365,7 +365,7 @@ class flat_set //! Complexity: Constant. //! //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE flat_set(BOOST_RV_REF(flat_set) x) + inline flat_set(BOOST_RV_REF(flat_set) x) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : tree_t(BOOST_MOVE_BASE(tree_t, x)) {} @@ -373,7 +373,7 @@ class flat_set //! Effects: Copy constructs a container using the specified allocator. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE flat_set(const flat_set& x, const allocator_type &a) + inline flat_set(const flat_set& x, const allocator_type &a) : tree_t(static_cast(x), a) {} @@ -381,14 +381,14 @@ class flat_set //! Constructs *this using x's resources. //! //! Complexity: Constant if a == x.get_allocator(), linear otherwise - BOOST_CONTAINER_FORCEINLINE flat_set(BOOST_RV_REF(flat_set) x, const allocator_type &a) + inline flat_set(BOOST_RV_REF(flat_set) x, const allocator_type &a) : tree_t(BOOST_MOVE_BASE(tree_t, x), a) {} //! Effects: Makes *this a copy of x. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE flat_set& operator=(BOOST_COPY_ASSIGN_REF(flat_set) x) + inline flat_set& operator=(BOOST_COPY_ASSIGN_REF(flat_set) x) { return static_cast(this->tree_t::operator=(static_cast(x))); } //! Throws: If allocator_traits_type::propagate_on_container_move_assignment @@ -397,7 +397,7 @@ class flat_set //! Complexity: Constant if allocator_traits_type:: //! propagate_on_container_move_assignment is true or //! this->get>allocator() == x.get_allocator(). Linear otherwise. - BOOST_CONTAINER_FORCEINLINE flat_set& operator=(BOOST_RV_REF(flat_set) x) + inline flat_set& operator=(BOOST_RV_REF(flat_set) x) BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || allocator_traits_type::is_always_equal::value) && boost::container::dtl::is_nothrow_move_assignable::value) @@ -602,7 +602,7 @@ class flat_set //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_FWD_REF(Args)... args) + inline std::pair emplace(BOOST_FWD_REF(Args)... args) { return this->tree_t::emplace_unique(boost::forward(args)...); } //! Effects: Inserts an object of type Key constructed with @@ -618,18 +618,18 @@ class flat_set //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) + inline iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) { return this->tree_t::emplace_hint_unique(p, boost::forward(args)...); } #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #define BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE(N) \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_MOVE_UREF##N)\ + inline std::pair emplace(BOOST_MOVE_UREF##N)\ { return this->tree_t::emplace_unique(BOOST_MOVE_FWD##N); }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { return this->tree_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ // BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE) @@ -707,7 +707,7 @@ class flat_set //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) + inline void insert(InputIterator first, InputIterator last) { this->tree_t::insert_unique(first, last); } //! Requires: first, last are not iterators into *this and @@ -721,7 +721,7 @@ class flat_set //! //! Note: Non-standard extension. If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, InputIterator first, InputIterator last) + inline void insert(ordered_unique_range_t, InputIterator first, InputIterator last) { this->tree_t::insert_unique(ordered_unique_range, first, last); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) @@ -731,7 +731,7 @@ class flat_set //! Complexity: N log(N). //! //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) + inline void insert(std::initializer_list il) { this->tree_t::insert_unique(il.begin(), il.end()); } //! Requires: Range [il.begin(), il.end()) must be ordered according to the predicate @@ -743,28 +743,28 @@ class flat_set //! Complexity: Linear. //! //! Note: Non-standard extension. If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, std::initializer_list il) + inline void insert(ordered_unique_range_t, std::initializer_list il) { this->tree_t::insert_unique(ordered_unique_range, il.begin(), il.end()); } #endif //! @copydoc ::boost::container::flat_map::merge(flat_map&) template - BOOST_CONTAINER_FORCEINLINE void merge(flat_set& source) + inline void merge(flat_set& source) { this->tree_t::merge_unique(source.tree()); } //! @copydoc ::boost::container::flat_set::merge(flat_set&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG flat_set BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } //! @copydoc ::boost::container::flat_map::merge(flat_multimap&) template - BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset& source) + inline void merge(flat_multiset& source) { this->tree_t::merge_unique(source.tree()); } //! @copydoc ::boost::container::flat_set::merge(flat_multiset&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG flat_multiset BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } //! Effects: If present, erases the element in the container with key equivalent to x. @@ -773,7 +773,7 @@ class flat_set //! //! Complexity: Logarithmic search time plus erasure time //! linear to the elements with bigger keys. - BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x) + inline size_type erase(const key_type& x) { return this->tree_t::erase_unique(x); } #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) @@ -917,7 +917,7 @@ class flat_set //! Returns: The number of elements with key equivalent to x. //! //! Complexity: log(size())+count(k) - BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const + inline size_type count(const key_type& x) const { return static_cast(this->tree_t::find(x) != this->tree_t::cend()); } //! Requires: This overload is available only if @@ -927,7 +927,7 @@ class flat_set //! //! Complexity: log(size())+count(k) template - BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const + inline size_type count(const K& x) const //Don't use find() != end optimization here as transparent comparators with key K might //return a different range than key_type (which can only return a single element range) { return this->tree_t::count(x); } @@ -1019,13 +1019,13 @@ class flat_set //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). //! //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& x) const + inline std::pair equal_range(const key_type& x) const { return this->tree_t::lower_bound_range(x); } //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). //! //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& x) + inline std::pair equal_range(const key_type& x) { return this->tree_t::lower_bound_range(x); } //! Requires: This overload is available only if @@ -1108,7 +1108,7 @@ class flat_set //! Complexity: Assuming O(1) move assignment, O(NlogN) with N = seq.size() //! //! Throws: If the comparison or the move constructor throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq) + inline void adopt_sequence(BOOST_RV_REF(sequence_type) seq) { this->tree_t::adopt_sequence_unique(boost::move(seq)); } //! Requires: seq shall be ordered according to this->compare() @@ -1120,7 +1120,7 @@ class flat_set //! Complexity: Assuming O(1) move assignment, O(1) //! //! Throws: If the move assignment throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq) + inline void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq) { this->tree_t::adopt_sequence_unique(ordered_unique_range_t(), boost::move(seq)); } //! Effects: Returns a const view of the underlying sequence. @@ -1128,7 +1128,7 @@ class flat_set //! Complexity: Constant //! //! Throws: Nothing - BOOST_CONTAINER_FORCEINLINE const sequence_type & sequence() const BOOST_NOEXCEPT + inline const sequence_type & sequence() const BOOST_NOEXCEPT { return this->get_sequence_cref(); } }; @@ -1279,47 +1279,47 @@ class flat_multiset typedef typename sequence_type::const_reverse_iterator const_reverse_iterator; //! @copydoc ::boost::container::flat_set::flat_set() - BOOST_CONTAINER_FORCEINLINE flat_multiset() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value && + inline flat_multiset() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value && dtl::is_nothrow_default_constructible::value) : tree_t() {} //! @copydoc ::boost::container::flat_set::flat_set(const Compare&) - BOOST_CONTAINER_FORCEINLINE explicit flat_multiset(const Compare& comp) + inline explicit flat_multiset(const Compare& comp) : tree_t(comp) {} //! @copydoc ::boost::container::flat_set::flat_set(const allocator_type&) - BOOST_CONTAINER_FORCEINLINE explicit flat_multiset(const allocator_type& a) + inline explicit flat_multiset(const allocator_type& a) : tree_t(a) {} //! @copydoc ::boost::container::flat_set::flat_set(const Compare&, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE flat_multiset(const Compare& comp, const allocator_type& a) + inline flat_multiset(const Compare& comp, const allocator_type& a) : tree_t(comp, a) {} //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator) template - BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last) + inline flat_multiset(InputIterator first, InputIterator last) : tree_t(false, first, last) {} //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const allocator_type&) template - BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const allocator_type& a) + inline flat_multiset(InputIterator first, InputIterator last, const allocator_type& a) : tree_t(false, first, last, a) {} //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const Compare& comp) template - BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const Compare& comp) + inline flat_multiset(InputIterator first, InputIterator last, const Compare& comp) : tree_t(false, first, last, comp) {} //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const Compare& comp, const allocator_type&) template - BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) + inline flat_multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : tree_t(false, first, last, comp, a) {} @@ -1333,7 +1333,7 @@ class flat_multiset //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last) + inline flat_multiset(ordered_range_t, InputIterator first, InputIterator last) : tree_t(ordered_range, first, last) {} @@ -1347,7 +1347,7 @@ class flat_multiset //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) + inline flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) : tree_t(ordered_range, first, last, comp) {} @@ -1361,7 +1361,7 @@ class flat_multiset //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) + inline flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : tree_t(ordered_range, first, last, comp, a) {} @@ -1375,28 +1375,28 @@ class flat_multiset //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const allocator_type &a) + inline flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const allocator_type &a) : tree_t(ordered_range, first, last, Compare(), a) {} #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list il) + inline flat_multiset(std::initializer_list il) : tree_t(false, il.begin(), il.end()) {} //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list il, const allocator_type& a) + inline flat_multiset(std::initializer_list il, const allocator_type& a) : tree_t(false, il.begin(), il.end(), a) {} //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list, const Compare& comp) - BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list il, const Compare& comp) + inline flat_multiset(std::initializer_list il, const Compare& comp) : tree_t(false, il.begin(), il.end(), comp) {} //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list, const Compare& comp, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list il, const Compare& comp, const allocator_type& a) + inline flat_multiset(std::initializer_list il, const Compare& comp, const allocator_type& a) : tree_t(false, il.begin(), il.end(), comp, a) {} @@ -1409,7 +1409,7 @@ class flat_multiset //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list il) + inline flat_multiset(ordered_range_t, std::initializer_list il) : tree_t(ordered_range, il.begin(), il.end()) {} @@ -1422,7 +1422,7 @@ class flat_multiset //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list il, const Compare& comp) + inline flat_multiset(ordered_range_t, std::initializer_list il, const Compare& comp) : tree_t(ordered_range, il.begin(), il.end(), comp) {} @@ -1435,38 +1435,38 @@ class flat_multiset //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) + inline flat_multiset(ordered_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) : tree_t(ordered_range, il.begin(), il.end(), comp, a) {} #endif //! @copydoc ::boost::container::flat_set::flat_set(const flat_set &) - BOOST_CONTAINER_FORCEINLINE flat_multiset(const flat_multiset& x) + inline flat_multiset(const flat_multiset& x) : tree_t(static_cast(x)) {} //! @copydoc ::boost::container::flat_set::flat_set(flat_set &&) - BOOST_CONTAINER_FORCEINLINE flat_multiset(BOOST_RV_REF(flat_multiset) x) + inline flat_multiset(BOOST_RV_REF(flat_multiset) x) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : tree_t(boost::move(static_cast(x))) {} //! @copydoc ::boost::container::flat_set::flat_set(const flat_set &, const allocator_type &) - BOOST_CONTAINER_FORCEINLINE flat_multiset(const flat_multiset& x, const allocator_type &a) + inline flat_multiset(const flat_multiset& x, const allocator_type &a) : tree_t(static_cast(x), a) {} //! @copydoc ::boost::container::flat_set::flat_set(flat_set &&, const allocator_type &) - BOOST_CONTAINER_FORCEINLINE flat_multiset(BOOST_RV_REF(flat_multiset) x, const allocator_type &a) + inline flat_multiset(BOOST_RV_REF(flat_multiset) x, const allocator_type &a) : tree_t(BOOST_MOVE_BASE(tree_t, x), a) {} //! @copydoc ::boost::container::flat_set::operator=(const flat_set &) - BOOST_CONTAINER_FORCEINLINE flat_multiset& operator=(BOOST_COPY_ASSIGN_REF(flat_multiset) x) + inline flat_multiset& operator=(BOOST_COPY_ASSIGN_REF(flat_multiset) x) { return static_cast(this->tree_t::operator=(static_cast(x))); } //! @copydoc ::boost::container::flat_set::operator=(flat_set &&) - BOOST_CONTAINER_FORCEINLINE flat_multiset& operator=(BOOST_RV_REF(flat_multiset) x) + inline flat_multiset& operator=(BOOST_RV_REF(flat_multiset) x) BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || allocator_traits_type::is_always_equal::value) && boost::container::dtl::is_nothrow_move_assignable::value) @@ -1566,7 +1566,7 @@ class flat_multiset //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args) + inline iterator emplace(BOOST_FWD_REF(Args)... args) { return this->tree_t::emplace_equal(boost::forward(args)...); } //! Effects: Inserts an object of type Key constructed with @@ -1581,18 +1581,18 @@ class flat_multiset //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) + inline iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) { return this->tree_t::emplace_hint_equal(p, boost::forward(args)...); } #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #define BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE(N) \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\ + inline iterator emplace(BOOST_MOVE_UREF##N)\ { return this->tree_t::emplace_equal(BOOST_MOVE_FWD##N); }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { return this->tree_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ // BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE) @@ -1658,7 +1658,7 @@ class flat_multiset //! //! Note: If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) + inline void insert(InputIterator first, InputIterator last) { this->tree_t::insert_equal(first, last); } //! Requires: first, last are not iterators into *this and @@ -1671,7 +1671,7 @@ class flat_multiset //! //! Note: Non-standard extension. If an element is inserted it might invalidate elements. template - BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, InputIterator first, InputIterator last) + inline void insert(ordered_range_t, InputIterator first, InputIterator last) { this->tree_t::insert_equal(ordered_range, first, last); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) @@ -1680,7 +1680,7 @@ class flat_multiset //! Complexity: N log(N). //! //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) + inline void insert(std::initializer_list il) { this->tree_t::insert_equal(il.begin(), il.end()); } //! Requires: Range [il.begin(), il.end()) must be ordered according to the predicate. @@ -1691,28 +1691,28 @@ class flat_multiset //! Complexity: Linear. //! //! Note: Non-standard extension. If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, std::initializer_list il) + inline void insert(ordered_range_t, std::initializer_list il) { this->tree_t::insert_equal(ordered_range, il.begin(), il.end()); } #endif //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap&) template - BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset& source) + inline void merge(flat_multiset& source) { this->tree_t::merge_equal(source.tree()); } //! @copydoc ::boost::container::flat_multiset::merge(flat_multiset&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG flat_multiset BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } //! @copydoc ::boost::container::flat_multimap::merge(flat_map&) template - BOOST_CONTAINER_FORCEINLINE void merge(flat_set& source) + inline void merge(flat_set& source) { this->tree_t::merge_equal(source.tree()); } //! @copydoc ::boost::container::flat_multiset::merge(flat_set&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG flat_set BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) @@ -1840,7 +1840,7 @@ class flat_multiset //! Complexity: Assuming O(1) move assignment, O(NlogN) with N = seq.size() //! //! Throws: If the comparison or the move constructor throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq) + inline void adopt_sequence(BOOST_RV_REF(sequence_type) seq) { this->tree_t::adopt_sequence_equal(boost::move(seq)); } //! Requires: seq shall be ordered according to this->compare() @@ -1851,7 +1851,7 @@ class flat_multiset //! Complexity: Assuming O(1) move assignment, O(1) //! //! Throws: If the move assignment throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq) + inline void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq) { this->tree_t::adopt_sequence_equal(ordered_range_t(), boost::move(seq)); } //! Effects: Returns a const view of the underlying sequence. @@ -1859,7 +1859,7 @@ class flat_multiset //! Complexity: Constant //! //! Throws: Nothing - BOOST_CONTAINER_FORCEINLINE const sequence_type & sequence() const BOOST_NOEXCEPT + inline const sequence_type & sequence() const BOOST_NOEXCEPT { return this->get_sequence_cref(); } }; diff --git a/include/boost/container/list.hpp b/include/boost/container/list.hpp index 88fa4c3..04512c5 100644 --- a/include/boost/container/list.hpp +++ b/include/boost/container/list.hpp @@ -301,7 +301,7 @@ class list //! Throws: Nothing. //! //! Complexity: Linear to the number of elements. - BOOST_CONTAINER_FORCEINLINE ~list() BOOST_NOEXCEPT_OR_NOTHROW + inline ~list() BOOST_NOEXCEPT_OR_NOTHROW {} //AllocHolder clears the list //! Effects: Makes *this contain the same elements as x. @@ -377,7 +377,7 @@ class list //! Throws: If memory allocation throws or T's copy constructor throws. //! //! Complexity: Linear to the number of elements in x. - BOOST_CONTAINER_FORCEINLINE list& operator=(std::initializer_list il) + inline list& operator=(std::initializer_list il) { this->assign(il.begin(), il.end()); return *this; @@ -389,7 +389,7 @@ class list //! Throws: If memory allocation throws or T's copy constructor throws. //! //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE void assign(size_type n, const T& val) + inline void assign(size_type n, const T& val) { typedef constant_iterator cvalue_iterator; return this->assign(cvalue_iterator(val, n), cvalue_iterator()); @@ -426,7 +426,7 @@ class list //! T's constructor from dereferencing std::initializer_list iterator throws. //! //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE void assign(std::initializer_list il) + inline void assign(std::initializer_list il) { this->assign(il.begin(), il.end()); } #endif @@ -435,7 +435,7 @@ class list //! Throws: If allocator's copy constructor throws. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return allocator_type(this->node_alloc()); } @@ -446,7 +446,7 @@ class list //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW { return this->node_alloc(); } @@ -457,7 +457,7 @@ class list //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return this->node_alloc(); } @@ -472,7 +472,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator begin() BOOST_NOEXCEPT_OR_NOTHROW { return iterator(this->icont().begin()); } @@ -481,7 +481,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW { return this->cbegin(); } @@ -490,7 +490,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator end() BOOST_NOEXCEPT_OR_NOTHROW { return iterator(this->icont().end()); } @@ -499,7 +499,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW { return this->cend(); } @@ -509,7 +509,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW { return reverse_iterator(end()); } @@ -519,7 +519,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return this->crbegin(); } @@ -529,7 +529,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW { return reverse_iterator(begin()); } @@ -539,7 +539,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW { return this->crend(); } @@ -548,7 +548,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return const_iterator(this->non_const_icont().begin()); } @@ -557,7 +557,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW { return const_iterator(this->non_const_icont().end()); } @@ -567,7 +567,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return const_reverse_iterator(this->cend()); } @@ -577,7 +577,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW { return const_reverse_iterator(this->cbegin()); } @@ -592,7 +592,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool empty() const BOOST_NOEXCEPT_OR_NOTHROW { return !this->size(); } @@ -601,7 +601,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type size() const BOOST_NOEXCEPT_OR_NOTHROW { return this->icont().size(); } @@ -610,7 +610,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW { return AllocHolder::max_size(); } @@ -655,7 +655,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference front() BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -670,7 +670,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -685,7 +685,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference back() BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -700,7 +700,7 @@ class list //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1343,49 +1343,49 @@ class list //! Effects: Returns true if x and y are equal //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator==(const list& x, const list& y) { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } //! Effects: Returns true if x and y are unequal //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator!=(const list& x, const list& y) { return !(x == y); } //! Effects: Returns true if x is less than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<(const list& x, const list& y) { return boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } //! Effects: Returns true if x is greater than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>(const list& x, const list& y) { return y < x; } //! Effects: Returns true if x is equal or less than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<=(const list& x, const list& y) { return !(y < x); } //! Effects: Returns true if x is equal or greater than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>=(const list& x, const list& y) { return !(x < y); } //! Effects: x.swap(y) //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE friend void swap(list& x, list& y) + inline friend void swap(list& x, list& y) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y))) { x.swap(y); } diff --git a/include/boost/container/map.hpp b/include/boost/container/map.hpp index 4669b27..2db85ec 100644 --- a/include/boost/container/map.hpp +++ b/include/boost/container/map.hpp @@ -141,7 +141,7 @@ class map //! Effects: Default constructs an empty map. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE + inline map() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value && dtl::is_nothrow_default_constructible::value) : base_t() @@ -151,21 +151,21 @@ class map //! and allocator. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE map(const Compare& comp, const allocator_type& a) + inline map(const Compare& comp, const allocator_type& a) : base_t(comp, a) {} //! Effects: Constructs an empty map using the specified comparison object. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit map(const Compare& comp) + inline explicit map(const Compare& comp) : base_t(comp) {} //! Effects: Constructs an empty map using the specified allocator. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit map(const allocator_type& a) + inline explicit map(const allocator_type& a) : base_t(a) {} @@ -175,7 +175,7 @@ class map //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last) + inline map(InputIterator first, InputIterator last) : base_t(true, first, last) {} @@ -185,7 +185,7 @@ class map //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const allocator_type& a) + inline map(InputIterator first, InputIterator last, const allocator_type& a) : base_t(true, first, last, Compare(), a) {} @@ -195,7 +195,7 @@ class map //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const Compare& comp) + inline map(InputIterator first, InputIterator last, const Compare& comp) : base_t(true, first, last, comp) {} @@ -205,7 +205,7 @@ class map //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) + inline map(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : base_t(true, first, last, comp, a) {} @@ -220,7 +220,7 @@ class map //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last) + inline map( ordered_unique_range_t, InputIterator first, InputIterator last) : base_t(ordered_range, first, last) {} @@ -235,7 +235,7 @@ class map //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp) + inline map( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp) : base_t(ordered_range, first, last, comp) {} @@ -250,7 +250,7 @@ class map //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last + inline map( ordered_unique_range_t, InputIterator first, InputIterator last , const Compare& comp, const allocator_type& a) : base_t(ordered_range, first, last, comp, a) {} @@ -266,7 +266,7 @@ class map //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE map(ordered_unique_range_t, InputIterator first, InputIterator last, const allocator_type& a) + inline map(ordered_unique_range_t, InputIterator first, InputIterator last, const allocator_type& a) : base_t(ordered_range, first, last, Compare(), a) {} @@ -277,7 +277,7 @@ class map //! //! Complexity: Linear in N if the range [first ,last ) is already sorted according //! to the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE map(std::initializer_list il) + inline map(std::initializer_list il) : base_t(true, il.begin(), il.end()) {} @@ -286,7 +286,7 @@ class map //! //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE map(std::initializer_list il, const Compare& comp) + inline map(std::initializer_list il, const Compare& comp) : base_t(true, il.begin(), il.end(), comp) {} @@ -295,7 +295,7 @@ class map //! //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE map(std::initializer_list il, const allocator_type& a) + inline map(std::initializer_list il, const allocator_type& a) : base_t(true, il.begin(), il.end(), Compare(), a) {} @@ -304,7 +304,7 @@ class map //! //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE map(std::initializer_list il, const Compare& comp, const allocator_type& a) + inline map(std::initializer_list il, const Compare& comp, const allocator_type& a) : base_t(true, il.begin(), il.end(), comp, a) {} @@ -317,7 +317,7 @@ class map //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE map(ordered_unique_range_t, std::initializer_list il) + inline map(ordered_unique_range_t, std::initializer_list il) : base_t(ordered_range, il.begin(), il.end()) {} @@ -331,7 +331,7 @@ class map //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE map(ordered_unique_range_t, std::initializer_list il, const Compare& comp) + inline map(ordered_unique_range_t, std::initializer_list il, const Compare& comp) : base_t(ordered_range, il.begin(), il.end(), comp) {} @@ -345,7 +345,7 @@ class map //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, std::initializer_list il + inline map( ordered_unique_range_t, std::initializer_list il , const Compare& comp, const allocator_type& a) : base_t(ordered_range, il.begin(), il.end(), comp, a) {} @@ -355,7 +355,7 @@ class map //! Effects: Copy constructs a map. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE map(const map& x) + inline map(const map& x) : base_t(static_cast(x)) {} @@ -364,7 +364,7 @@ class map //! Complexity: Constant. //! //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE map(BOOST_RV_REF(map) x) + inline map(BOOST_RV_REF(map) x) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : base_t(BOOST_MOVE_BASE(base_t, x)) {} @@ -372,7 +372,7 @@ class map //! Effects: Copy constructs a map using the specified allocator. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE map(const map& x, const allocator_type &a) + inline map(const map& x, const allocator_type &a) : base_t(static_cast(x), a) {} @@ -382,14 +382,14 @@ class map //! Complexity: Constant if x == x.get_allocator(), linear otherwise. //! //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE map(BOOST_RV_REF(map) x, const allocator_type &a) + inline map(BOOST_RV_REF(map) x, const allocator_type &a) : base_t(BOOST_MOVE_BASE(base_t, x), a) {} //! Effects: Makes *this a copy of x. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE map& operator=(BOOST_COPY_ASSIGN_REF(map) x) + inline map& operator=(BOOST_COPY_ASSIGN_REF(map) x) { return static_cast(this->base_t::operator=(static_cast(x))); } //! Effects: this->swap(x.get()). @@ -400,7 +400,7 @@ class map //! Complexity: Constant if allocator_traits_type:: //! propagate_on_container_move_assignment is true or //! this->get>allocator() == x.get_allocator(). Linear otherwise. - BOOST_CONTAINER_FORCEINLINE map& operator=(BOOST_RV_REF(map) x) + inline map& operator=(BOOST_RV_REF(map) x) BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || allocator_traits_type::is_always_equal::value) && boost::container::dtl::is_nothrow_move_assignable::value) @@ -409,7 +409,7 @@ class map #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) //! Effects: Assign content of il to *this. //! - BOOST_CONTAINER_FORCEINLINE map& operator=(std::initializer_list il) + inline map& operator=(std::initializer_list il) { this->clear(); insert(il.begin(), il.end()); @@ -574,8 +574,8 @@ class map mapped_type& operator[](key_type &&k); #elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN) //in compilers like GCC 3.4, we can't catch temporaries - BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); } - BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); } + inline mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); } + inline mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); } #else BOOST_MOVE_CONVERSION_AWARE_CATCH( operator[] , key_type, mapped_type&, this->priv_subscript) #endif @@ -593,7 +593,7 @@ class map //! //! Complexity: Logarithmic in the size of the container. template - BOOST_CONTAINER_FORCEINLINE std::pair insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj) + inline std::pair insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj) { return this->base_t::insert_or_assign(const_iterator(), k, ::boost::forward(obj)); } //! Effects: If a key equivalent to k already exists in the container, assigns forward(obj) @@ -609,7 +609,7 @@ class map //! //! Complexity: Logarithmic in the size of the container. template - BOOST_CONTAINER_FORCEINLINE std::pair insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj) + inline std::pair insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj) { return this->base_t::insert_or_assign(const_iterator(), ::boost::move(k), ::boost::forward(obj)); } //! Effects: If a key equivalent to k already exists in the container, assigns forward(obj) @@ -627,7 +627,7 @@ class map //! Complexity: Logarithmic in the size of the container in general, but amortized constant if //! the new element is inserted just before hint. template - BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj) + inline iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj) { return this->base_t::insert_or_assign(hint, k, ::boost::forward(obj)).first; } //! Effects: If a key equivalent to k already exists in the container, assigns forward(obj) @@ -645,7 +645,7 @@ class map //! Complexity: Logarithmic in the size of the container in general, but amortized constant if //! the new element is inserted just before hint. template - BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj) + inline iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj) { return this->base_t::insert_or_assign(hint, ::boost::move(k), ::boost::forward(obj)).first; } //! Returns: A reference to the element whose key is equivalent to x. @@ -686,7 +686,7 @@ class map //! points to the element with key equivalent to the key of x. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE std::pair insert(const value_type& x) + inline std::pair insert(const value_type& x) { return this->base_t::insert_unique_convertible(x); } //! Effects: Move constructs a new value from x if and only if there is @@ -697,7 +697,7 @@ class map //! points to the element with key equivalent to the key of x. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE std::pair insert(BOOST_RV_REF(value_type) x) + inline std::pair insert(BOOST_RV_REF(value_type) x) { return this->base_t::insert_unique_convertible(boost::move(x)); } //! Effects: Inserts a new value_type created from the pair if and only if @@ -709,7 +709,7 @@ class map //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_DOC1ST + inline BOOST_CONTAINER_DOC1ST ( std::pair , typename dtl::enable_if_c< dtl::is_convertible::value || @@ -718,7 +718,7 @@ class map insert(BOOST_FWD_REF(Pair) x) { return this->base_t::emplace_unique(boost::forward(x)); } - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x) + inline iterator insert(const_iterator p, const value_type& x) { return this->base_t::insert_unique_hint_convertible(p, x); } //! Effects: Inserts a copy of x in the container if and only if there is @@ -730,7 +730,7 @@ class map //! //! Complexity: Logarithmic in general, but amortized constant if t //! is inserted right before p. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x) + inline iterator insert(const_iterator p, BOOST_RV_REF(value_type) x) { return this->base_t::insert_unique_hint_convertible(p, boost::move(x)); } //! Effects: Inserts a copy of x in the container if and only if there is @@ -743,7 +743,7 @@ class map //! Complexity: Logarithmic in general, but amortized constant if t //! is inserted right before p. template - BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_DOC1ST + inline BOOST_CONTAINER_DOC1ST ( iterator , typename dtl::enable_if_c< dtl::is_convertible::value || @@ -763,7 +763,7 @@ class map //! //! Complexity: Logarithmic in general, but amortized constant if t //! is inserted right before p. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x) + inline iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x) { return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); } //! Effects: Move constructs a new value from x if and only if there is @@ -775,7 +775,7 @@ class map //! //! Complexity: Logarithmic in general, but amortized constant if t //! is inserted right before p. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x) + inline iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x) { return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); } //! Effects: Inserts a copy of x in the container. @@ -784,7 +784,7 @@ class map //! Returns: An iterator pointing to the element with key equivalent to the key of x. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const nonconst_value_type& x) + inline iterator insert(const_iterator p, const nonconst_value_type& x) { return this->try_emplace(p, x.first, x.second); } @@ -796,7 +796,7 @@ class map //! //! Complexity: At most N log(size()+N) (N is the distance from first to last) template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) + inline void insert(InputIterator first, InputIterator last) { this->base_t::insert_unique_range(first, last); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) @@ -804,7 +804,7 @@ class map //! if there is no element with key equivalent to the key of that element. //! //! Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end()) - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) + inline void insert(std::initializer_list il) { this->base_t::insert_unique_range(il.begin(), il.end()); } #endif @@ -854,7 +854,7 @@ class map //! Complexity: Logarithmic in general, but amortized constant if t //! is inserted right before p. template - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_FWD_REF(Args)... args) + inline std::pair emplace(BOOST_FWD_REF(Args)... args) { return this->base_t::emplace_unique(boost::forward(args)...); } //! Effects: Inserts an object of type T constructed with @@ -868,7 +868,7 @@ class map //! Complexity: Logarithmic in general, but amortized constant if t //! is inserted right before p. template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) + inline iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) { return this->base_t::emplace_hint_unique(p, boost::forward(args)...); } //! Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, @@ -883,7 +883,7 @@ class map //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args) + inline std::pair try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args) { return this->base_t::try_emplace(const_iterator(), k, boost::forward(args)...); } //! Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, @@ -898,7 +898,7 @@ class map //! Complexity: Logarithmic in general, but amortized constant if value //! is inserted right before p. template - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args) + inline iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args) { return this->base_t::try_emplace(hint, k, boost::forward(args)...).first; } //! Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, @@ -913,7 +913,7 @@ class map //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args) + inline std::pair try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args) { return this->base_t::try_emplace(const_iterator(), boost::move(k), boost::forward(args)...); } //! Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, @@ -928,34 +928,34 @@ class map //! Complexity: Logarithmic in general, but amortized constant if value //! is inserted right before p. template - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args) + inline iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args) { return this->base_t::try_emplace(hint, boost::move(k), boost::forward(args)...).first; } #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #define BOOST_CONTAINER_MAP_EMPLACE_CODE(N) \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_MOVE_UREF##N)\ + inline std::pair emplace(BOOST_MOVE_UREF##N)\ { return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline std::pair try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { return this->base_t::try_emplace(const_iterator(), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { return this->base_t::try_emplace(hint, k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first; }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline std::pair try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { return this->base_t::try_emplace(const_iterator(), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { return this->base_t::try_emplace(hint, boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first; }\ // BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MAP_EMPLACE_CODE) @@ -968,7 +968,7 @@ class map //! Returns: Returns the number of erased elements (0/1). //! //! Complexity: log(size()) + count(k) - BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x) + inline size_type erase(const key_type& x) { return this->base_t::erase_unique(x); } #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) @@ -1032,7 +1032,7 @@ class map //! //! Complexity: N log(size() + N) (N has the value source.size()) template - BOOST_CONTAINER_FORCEINLINE void merge(map& source) + inline void merge(map& source) { typedef dtl::tree base2_t; @@ -1041,12 +1041,12 @@ class map //! @copydoc ::boost::container::map::merge(map&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG map BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG map BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } //! @copydoc ::boost::container::map::merge(map&) template - BOOST_CONTAINER_FORCEINLINE void merge(multimap& source) + inline void merge(multimap& source) { typedef dtl::tree base2_t; @@ -1055,7 +1055,7 @@ class map //! @copydoc ::boost::container::map::merge(map&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multimap BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG multimap BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) @@ -1124,7 +1124,7 @@ class map //! Returns: The number of elements with key equivalent to x. //! //! Complexity: log(size())+count(k) - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type count(const key_type& x) const { return static_cast(this->find(x) != this->cend()); } @@ -1135,7 +1135,7 @@ class map //! //! Complexity: log(size())+count(k) template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type count(const K& x) const { return static_cast(this->find(x) != this->cend()); } @@ -1296,7 +1296,7 @@ class map #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED private: template - BOOST_CONTAINER_FORCEINLINE mapped_type& priv_subscript(BOOST_FWD_REF(KeyConvertible) k) + inline mapped_type& priv_subscript(BOOST_FWD_REF(KeyConvertible) k) { return this->try_emplace(boost::forward(k)).first->second; } @@ -1471,7 +1471,7 @@ class multimap //! Effects: Default constructs an empty multimap. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE multimap() + inline multimap() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value && dtl::is_nothrow_default_constructible::value) : base_t() @@ -1481,21 +1481,21 @@ class multimap //! object and allocator. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit multimap(const allocator_type& a) + inline explicit multimap(const allocator_type& a) : base_t(a) {} //! Effects: Constructs an empty multimap using the specified comparison. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit multimap(const Compare& comp) + inline explicit multimap(const Compare& comp) : base_t(comp) {} //! Effects: Constructs an empty multimap using the specified comparison and allocator. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE multimap(const Compare& comp, const allocator_type& a) + inline multimap(const Compare& comp, const allocator_type& a) : base_t(comp, a) {} @@ -1505,7 +1505,7 @@ class multimap //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last) + inline multimap(InputIterator first, InputIterator last) : base_t(false, first, last) {} @@ -1515,7 +1515,7 @@ class multimap //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const allocator_type& a) + inline multimap(InputIterator first, InputIterator last, const allocator_type& a) : base_t(false, first, last, Compare(), a) {} @@ -1525,7 +1525,7 @@ class multimap //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const Compare& comp) + inline multimap(InputIterator first, InputIterator last, const Compare& comp) : base_t(false, first, last, comp) {} @@ -1535,7 +1535,7 @@ class multimap //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, + inline multimap(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : base_t(false, first, last, comp, a) {} @@ -1550,7 +1550,7 @@ class multimap //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last) + inline multimap(ordered_range_t, InputIterator first, InputIterator last) : base_t(ordered_range, first, last) {} @@ -1564,7 +1564,7 @@ class multimap //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) + inline multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) : base_t(ordered_range, first, last, comp) {} @@ -1578,7 +1578,7 @@ class multimap //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, + inline multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : base_t(ordered_range, first, last, comp, a) {} @@ -1593,7 +1593,7 @@ class multimap //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const allocator_type& a) + inline multimap(ordered_range_t, InputIterator first, InputIterator last, const allocator_type& a) : base_t(ordered_range, first, last, Compare(), a) {} @@ -1603,7 +1603,7 @@ class multimap //! //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list il) + inline multimap(std::initializer_list il) : base_t(false, il.begin(), il.end()) {} @@ -1612,7 +1612,7 @@ class multimap //! //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list il, const allocator_type& a) + inline multimap(std::initializer_list il, const allocator_type& a) : base_t(false, il.begin(), il.end(), Compare(), a) {} @@ -1621,7 +1621,7 @@ class multimap //! //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list il, const Compare& comp) + inline multimap(std::initializer_list il, const Compare& comp) : base_t(false, il.begin(), il.end(), comp) {} @@ -1630,7 +1630,7 @@ class multimap //! //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list il, const Compare& comp, const allocator_type& a) + inline multimap(std::initializer_list il, const Compare& comp, const allocator_type& a) : base_t(false, il.begin(), il.end(), comp, a) {} @@ -1644,7 +1644,7 @@ class multimap //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list il) + inline multimap(ordered_range_t, std::initializer_list il) : base_t(ordered_range, il.begin(), il.end()) {} @@ -1657,7 +1657,7 @@ class multimap //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list il, const Compare& comp) + inline multimap(ordered_range_t, std::initializer_list il, const Compare& comp) : base_t(ordered_range, il.begin(), il.end(), comp) {} @@ -1670,7 +1670,7 @@ class multimap //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) + inline multimap(ordered_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) : base_t(ordered_range, il.begin(), il.end(), comp, a) {} @@ -1679,7 +1679,7 @@ class multimap //! Effects: Copy constructs a multimap. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x) + inline multimap(const multimap& x) : base_t(static_cast(x)) {} @@ -1688,7 +1688,7 @@ class multimap //! Complexity: Constant. //! //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x) + inline multimap(BOOST_RV_REF(multimap) x) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : base_t(BOOST_MOVE_BASE(base_t, x)) {} @@ -1696,7 +1696,7 @@ class multimap //! Effects: Copy constructs a multimap. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x, const allocator_type &a) + inline multimap(const multimap& x, const allocator_type &a) : base_t(static_cast(x), a) {} @@ -1705,20 +1705,20 @@ class multimap //! Complexity: Constant if a == x.get_allocator(), linear otherwise. //! //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x, const allocator_type &a) + inline multimap(BOOST_RV_REF(multimap) x, const allocator_type &a) : base_t(BOOST_MOVE_BASE(base_t, x), a) {} //! Effects: Makes *this a copy of x. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_COPY_ASSIGN_REF(multimap) x) + inline multimap& operator=(BOOST_COPY_ASSIGN_REF(multimap) x) { return static_cast(this->base_t::operator=(static_cast(x))); } //! Effects: this->swap(x.get()). //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_RV_REF(multimap) x) + inline multimap& operator=(BOOST_RV_REF(multimap) x) BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || allocator_traits_type::is_always_equal::value) && boost::container::dtl::is_nothrow_move_assignable::value) @@ -1727,7 +1727,7 @@ class multimap #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) //! Effects: Assign content of il to *this. //! - BOOST_CONTAINER_FORCEINLINE multimap& operator=(std::initializer_list il) + inline multimap& operator=(std::initializer_list il) { this->clear(); insert(il.begin(), il.end()); @@ -1805,7 +1805,7 @@ class multimap //! Complexity: Logarithmic in general, but amortized constant if t //! is inserted right before p. template - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args) + inline iterator emplace(BOOST_FWD_REF(Args)... args) { return this->base_t::emplace_equal(boost::forward(args)...); } //! Effects: Inserts an object of type T constructed with @@ -1818,18 +1818,18 @@ class multimap //! Complexity: Logarithmic in general, but amortized constant if t //! is inserted right before p. template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) + inline iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) { return this->base_t::emplace_hint_equal(p, boost::forward(args)...); } #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #define BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE(N) \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\ + inline iterator emplace(BOOST_MOVE_UREF##N)\ { return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ // BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE) @@ -1841,14 +1841,14 @@ class multimap //! newly inserted element. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE iterator insert(const value_type& x) + inline iterator insert(const value_type& x) { return this->base_t::insert_equal_convertible(x); } //! Effects: Inserts a new value move-constructed from x and returns //! the iterator pointing to the newly inserted element. //! //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(value_type) x) + inline iterator insert(BOOST_RV_REF(value_type) x) { return this->base_t::insert_equal_convertible(boost::move(x)); } //! Effects: Inserts a new value constructed from x and returns @@ -1856,7 +1856,7 @@ class multimap //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_DOC1ST + inline BOOST_CONTAINER_DOC1ST ( iterator , typename dtl::enable_if_c< dtl::is_convertible::value || @@ -1873,7 +1873,7 @@ class multimap //! //! Complexity: Logarithmic in general, but amortized constant if t //! is inserted right before p. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x) + inline iterator insert(const_iterator p, const value_type& x) { return this->base_t::insert_equal_hint_convertible(p, x); } //! Effects: Inserts a new value move constructed from x in the container. @@ -1884,7 +1884,7 @@ class multimap //! //! Complexity: Logarithmic in general, but amortized constant if t //! is inserted right before p. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x) + inline iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x) { return this->base_t::insert_equal_hint_convertible(p, boost::move(x)); } //! Effects: Inserts a new value constructed from x in the container. @@ -1896,7 +1896,7 @@ class multimap //! Complexity: Logarithmic in general, but amortized constant if t //! is inserted right before p. template - BOOST_CONTAINER_FORCEINLINE BOOST_CONTAINER_DOC1ST + inline BOOST_CONTAINER_DOC1ST ( iterator , typename dtl::enable_if_c< dtl::is_convertible::value || @@ -1911,14 +1911,14 @@ class multimap //! //! Complexity: At most N log(size()+N) (N is the distance from first to last) template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) + inline void insert(InputIterator first, InputIterator last) { this->base_t::insert_equal_range(first, last); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) //! Effects: inserts each element from the range [il.begin(), il.end(). //! //! Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end()) - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) + inline void insert(std::initializer_list il) { this->base_t::insert_equal_range(il.begin(), il.end()); } #endif @@ -1987,7 +1987,7 @@ class multimap //! //! Complexity: N log(size() + N) (N has the value source.size()) template - BOOST_CONTAINER_FORCEINLINE void merge(multimap& source) + inline void merge(multimap& source) { typedef dtl::tree base2_t; @@ -1996,12 +1996,12 @@ class multimap //! @copydoc ::boost::container::multimap::merge(multimap&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multimap BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG multimap BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } //! @copydoc ::boost::container::multimap::merge(multimap&) template - BOOST_CONTAINER_FORCEINLINE void merge(map& source) + inline void merge(map& source) { typedef dtl::tree base2_t; @@ -2010,7 +2010,7 @@ class multimap //! @copydoc ::boost::container::multimap::merge(multimap&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG map BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG map BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) diff --git a/include/boost/container/new_allocator.hpp b/include/boost/container/new_allocator.hpp index 82c42a9..b01b9ba 100644 --- a/include/boost/container/new_allocator.hpp +++ b/include/boost/container/new_allocator.hpp @@ -129,25 +129,23 @@ class new_allocator //!Default constructor //!Never throws - new_allocator() BOOST_NOEXCEPT_OR_NOTHROW + inline new_allocator() BOOST_NOEXCEPT_OR_NOTHROW {} //!Constructor from other new_allocator. //!Never throws - new_allocator(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW + inline new_allocator(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW {} //!Copy assignment operator from other new_allocator. //!Never throws - new_allocator& operator=(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { - return *this; - } + inline new_allocator& operator=(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW + { return *this; } //!Constructor from related new_allocator. //!Never throws template - new_allocator(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW + inline new_allocator(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW {} //!Allocates memory for an array of count elements. @@ -174,22 +172,22 @@ class new_allocator //!Returns the maximum number of elements that could be allocated. //!Never throws - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW + inline size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW { return std::size_t(-1)/(2*sizeof(T)); } //!Swaps two allocators, does nothing //!because this new_allocator is stateless - friend void swap(new_allocator &, new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW + inline friend void swap(new_allocator &, new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW {} //!An new_allocator always compares to true, as memory allocated with one //!instance can be deallocated by another instance - friend bool operator==(const new_allocator &, const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW + inline friend bool operator==(const new_allocator &, const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW { return true; } //!An new_allocator always compares to false, as memory allocated with one //!instance can be deallocated by another instance - friend bool operator!=(const new_allocator &, const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW + inline friend bool operator!=(const new_allocator &, const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW { return false; } }; diff --git a/include/boost/container/scoped_allocator.hpp b/include/boost/container/scoped_allocator.hpp index 3e9c684..a979ad6 100644 --- a/include/boost/container/scoped_allocator.hpp +++ b/include/boost/container/scoped_allocator.hpp @@ -77,10 +77,10 @@ struct outermost_allocator_imp { typedef MaybeScopedAlloc type; - BOOST_CONTAINER_FORCEINLINE static type &get(MaybeScopedAlloc &a) + inline static type &get(MaybeScopedAlloc &a) { return a; } - BOOST_CONTAINER_FORCEINLINE static const type &get(const MaybeScopedAlloc &a) + inline static const type &get(const MaybeScopedAlloc &a) { return a; } }; @@ -90,10 +90,10 @@ struct outermost_allocator_imp typedef typename MaybeScopedAlloc::outer_allocator_type outer_type; typedef typename outermost_allocator_type_impl::type type; - BOOST_CONTAINER_FORCEINLINE static type &get(MaybeScopedAlloc &a) + inline static type &get(MaybeScopedAlloc &a) { return outermost_allocator_imp::get(a.outer_allocator()); } - BOOST_CONTAINER_FORCEINLINE static const type &get(const MaybeScopedAlloc &a) + inline static const type &get(const MaybeScopedAlloc &a) { return outermost_allocator_imp::get(a.outer_allocator()); } }; @@ -110,12 +110,12 @@ struct outermost_allocator {}; template -BOOST_CONTAINER_FORCEINLINE typename outermost_allocator::type & +inline typename outermost_allocator::type & get_outermost_allocator(Allocator &a) { return outermost_allocator::get(a); } template -BOOST_CONTAINER_FORCEINLINE const typename outermost_allocator::type & +inline const typename outermost_allocator::type & get_outermost_allocator(const Allocator &a) { return outermost_allocator::get(a); } @@ -159,34 +159,34 @@ class scoped_allocator_adaptor_base inner_allocator_type::is_always_equal::value > is_always_equal; - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base() + inline scoped_allocator_adaptor_base() {} template - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs &...args) + inline scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs &...args) : outer_allocator_type(::boost::forward(outerAlloc)) , m_inner(args...) {} - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other) + inline scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other) : outer_allocator_type(other.outer_allocator()) , m_inner(other.inner_allocator()) {} - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other) + inline scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other) : outer_allocator_type(::boost::move(other.outer_allocator())) , m_inner(::boost::move(other.inner_allocator())) {} template - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base + inline scoped_allocator_adaptor_base (const scoped_allocator_adaptor_base& other) : outer_allocator_type(other.outer_allocator()) , m_inner(other.inner_allocator()) {} template - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base + inline scoped_allocator_adaptor_base (BOOST_RV_REF_BEG scoped_allocator_adaptor_base BOOST_RV_REF_END other) : outer_allocator_type(other.outer_allocator()) @@ -197,7 +197,7 @@ class scoped_allocator_adaptor_base struct internal_type_t{}; template - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base + inline scoped_allocator_adaptor_base ( internal_type_t , BOOST_FWD_REF(OuterA2) outerAlloc , const inner_allocator_type &inner) @@ -207,7 +207,7 @@ class scoped_allocator_adaptor_base public: - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator= + inline scoped_allocator_adaptor_base &operator= (BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other) { outer_allocator_type::operator=(other.outer_allocator()); @@ -215,35 +215,35 @@ class scoped_allocator_adaptor_base return *this; } - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other) + inline scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other) { outer_allocator_type::operator=(boost::move(other.outer_allocator())); m_inner = ::boost::move(other.inner_allocator()); return *this; } - BOOST_CONTAINER_FORCEINLINE void swap(scoped_allocator_adaptor_base &r) + inline void swap(scoped_allocator_adaptor_base &r) { boost::adl_move_swap(this->outer_allocator(), r.outer_allocator()); boost::adl_move_swap(this->m_inner, r.inner_allocator()); } - BOOST_CONTAINER_FORCEINLINE friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r) + inline friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r) { l.swap(r); } - BOOST_CONTAINER_FORCEINLINE inner_allocator_type& inner_allocator() BOOST_NOEXCEPT_OR_NOTHROW + inline inner_allocator_type& inner_allocator() BOOST_NOEXCEPT_OR_NOTHROW { return m_inner; } - BOOST_CONTAINER_FORCEINLINE inner_allocator_type const& inner_allocator() const BOOST_NOEXCEPT_OR_NOTHROW + inline inner_allocator_type const& inner_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return m_inner; } - BOOST_CONTAINER_FORCEINLINE outer_allocator_type & outer_allocator() BOOST_NOEXCEPT_OR_NOTHROW + inline outer_allocator_type & outer_allocator() BOOST_NOEXCEPT_OR_NOTHROW { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE const outer_allocator_type &outer_allocator() const BOOST_NOEXCEPT_OR_NOTHROW + inline const outer_allocator_type &outer_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE scoped_allocator_type select_on_container_copy_construction() const + inline scoped_allocator_type select_on_container_copy_construction() const { return scoped_allocator_type (internal_type_t() @@ -302,33 +302,33 @@ class scoped_allocator_adaptor_base\ inner_allocator_type::is_always_equal::value\ > is_always_equal;\ \ - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(){}\ + inline scoped_allocator_adaptor_base(){}\ \ template \ - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, BOOST_MOVE_CREF##N)\ + inline scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, BOOST_MOVE_CREF##N)\ : outer_allocator_type(::boost::forward(outerAlloc))\ , m_inner(BOOST_MOVE_ARG##N)\ {}\ \ - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)\ + inline scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)\ : outer_allocator_type(other.outer_allocator())\ , m_inner(other.inner_allocator())\ {}\ \ - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\ + inline scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\ : outer_allocator_type(::boost::move(other.outer_allocator()))\ , m_inner(::boost::move(other.inner_allocator()))\ {}\ \ template \ - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base\ + inline scoped_allocator_adaptor_base\ (const scoped_allocator_adaptor_base& other)\ : outer_allocator_type(other.outer_allocator())\ , m_inner(other.inner_allocator())\ {}\ \ template \ - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base\ + inline scoped_allocator_adaptor_base\ (BOOST_RV_REF_BEG scoped_allocator_adaptor_base BOOST_RV_REF_END other)\ : outer_allocator_type(other.outer_allocator())\ , m_inner(other.inner_allocator())\ @@ -338,14 +338,14 @@ class scoped_allocator_adaptor_base\ struct internal_type_t{};\ \ template \ - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base\ + inline scoped_allocator_adaptor_base\ ( internal_type_t, BOOST_FWD_REF(OuterA2) outerAlloc, const inner_allocator_type &inner)\ : outer_allocator_type(::boost::forward(outerAlloc))\ , m_inner(inner)\ {}\ \ public:\ - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=\ + inline scoped_allocator_adaptor_base &operator=\ (BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other)\ {\ outer_allocator_type::operator=(other.outer_allocator());\ @@ -353,35 +353,35 @@ class scoped_allocator_adaptor_base\ return *this;\ }\ \ - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\ + inline scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\ {\ outer_allocator_type::operator=(boost::move(other.outer_allocator()));\ m_inner = ::boost::move(other.inner_allocator());\ return *this;\ }\ \ - BOOST_CONTAINER_FORCEINLINE void swap(scoped_allocator_adaptor_base &r)\ + inline void swap(scoped_allocator_adaptor_base &r)\ {\ boost::adl_move_swap(this->outer_allocator(), r.outer_allocator());\ boost::adl_move_swap(this->m_inner, r.inner_allocator());\ }\ \ - BOOST_CONTAINER_FORCEINLINE friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)\ + inline friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)\ { l.swap(r); }\ \ - BOOST_CONTAINER_FORCEINLINE inner_allocator_type& inner_allocator()\ + inline inner_allocator_type& inner_allocator()\ { return m_inner; }\ \ - BOOST_CONTAINER_FORCEINLINE inner_allocator_type const& inner_allocator() const\ + inline inner_allocator_type const& inner_allocator() const\ { return m_inner; }\ \ - BOOST_CONTAINER_FORCEINLINE outer_allocator_type & outer_allocator()\ + inline outer_allocator_type & outer_allocator()\ { return static_cast(*this); }\ \ - BOOST_CONTAINER_FORCEINLINE const outer_allocator_type &outer_allocator() const\ + inline const outer_allocator_type &outer_allocator() const\ { return static_cast(*this); }\ \ - BOOST_CONTAINER_FORCEINLINE scoped_allocator_type select_on_container_copy_construction() const\ + inline scoped_allocator_type select_on_container_copy_construction() const\ {\ return scoped_allocator_type\ (internal_type_t()\ @@ -438,30 +438,30 @@ class scoped_allocator_adaptor_base< OuterAlloc BOOST_CONTAINER_SCOPEDALLOC_DUMM typedef typename outer_traits_type:: is_always_equal is_always_equal; - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base() + inline scoped_allocator_adaptor_base() {} template - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc) + inline scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc) : outer_allocator_type(::boost::forward(outerAlloc)) {} - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other) + inline scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other) : outer_allocator_type(other.outer_allocator()) {} - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other) + inline scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other) : outer_allocator_type(::boost::move(other.outer_allocator())) {} template - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base + inline scoped_allocator_adaptor_base (const scoped_allocator_adaptor_base& other) : outer_allocator_type(other.outer_allocator()) {} template - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base + inline scoped_allocator_adaptor_base (BOOST_RV_REF_BEG scoped_allocator_adaptor_base BOOST_RV_REF_END other) : outer_allocator_type(other.outer_allocator()) {} @@ -470,44 +470,44 @@ class scoped_allocator_adaptor_base< OuterAlloc BOOST_CONTAINER_SCOPEDALLOC_DUMM struct internal_type_t{}; template - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base(internal_type_t, BOOST_FWD_REF(OuterA2) outerAlloc, const inner_allocator_type &) + inline scoped_allocator_adaptor_base(internal_type_t, BOOST_FWD_REF(OuterA2) outerAlloc, const inner_allocator_type &) : outer_allocator_type(::boost::forward(outerAlloc)) {} public: - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other) + inline scoped_allocator_adaptor_base &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other) { outer_allocator_type::operator=(other.outer_allocator()); return *this; } - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other) + inline scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other) { outer_allocator_type::operator=(boost::move(other.outer_allocator())); return *this; } - BOOST_CONTAINER_FORCEINLINE void swap(scoped_allocator_adaptor_base &r) + inline void swap(scoped_allocator_adaptor_base &r) { boost::adl_move_swap(this->outer_allocator(), r.outer_allocator()); } - BOOST_CONTAINER_FORCEINLINE friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r) + inline friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r) { l.swap(r); } - BOOST_CONTAINER_FORCEINLINE inner_allocator_type& inner_allocator() + inline inner_allocator_type& inner_allocator() { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE inner_allocator_type const& inner_allocator() const + inline inner_allocator_type const& inner_allocator() const { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE outer_allocator_type & outer_allocator() + inline outer_allocator_type & outer_allocator() { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE const outer_allocator_type &outer_allocator() const + inline const outer_allocator_type &outer_allocator() const { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE scoped_allocator_type select_on_container_copy_construction() const + inline scoped_allocator_type select_on_container_copy_construction() const { return scoped_allocator_type (internal_type_t() @@ -639,21 +639,21 @@ class scoped_allocator_adaptor //! Effects: value-initializes the OuterAlloc base class //! and the inner allocator object. - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor() + inline scoped_allocator_adaptor() {} - BOOST_CONTAINER_FORCEINLINE ~scoped_allocator_adaptor() + inline ~scoped_allocator_adaptor() {} //! Effects: initializes each allocator within the adaptor with //! the corresponding allocator from other. - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(const scoped_allocator_adaptor& other) + inline scoped_allocator_adaptor(const scoped_allocator_adaptor& other) : base_type(other.base()) {} //! Effects: move constructs each allocator within the adaptor with //! the corresponding allocator from other. - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(BOOST_RV_REF(scoped_allocator_adaptor) other) + inline scoped_allocator_adaptor(BOOST_RV_REF(scoped_allocator_adaptor) other) : base_type(::boost::move(other.base())) {} @@ -665,14 +665,14 @@ class scoped_allocator_adaptor //! with innerAllocs...(hence recursively initializing each allocator within the adaptor with the //! corresponding allocator from the argument list). template - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs & ...innerAllocs) + inline scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs & ...innerAllocs) : base_type(::boost::forward(outerAlloc), innerAllocs...) {} #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) #define BOOST_CONTAINER_SCOPED_ALLOCATOR_ADAPTOR_RELATED_ALLOCATOR_CONSTRUCTOR_CODE(N)\ template \ - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc BOOST_MOVE_I##N BOOST_MOVE_CREF##N)\ + inline scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc BOOST_MOVE_I##N BOOST_MOVE_CREF##N)\ : base_type(::boost::forward(outerAlloc) BOOST_MOVE_I##N BOOST_MOVE_ARG##N)\ {}\ // @@ -685,7 +685,7 @@ class scoped_allocator_adaptor //! //! Effects: initializes each allocator within the adaptor with the corresponding allocator from other. template - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(const scoped_allocator_adaptor &other) + inline scoped_allocator_adaptor(const scoped_allocator_adaptor &other) : base_type(other.base()) {} @@ -694,15 +694,15 @@ class scoped_allocator_adaptor //! Effects: initializes each allocator within the adaptor with the corresponding allocator //! rvalue from other. template - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(BOOST_RV_REF_BEG scoped_allocator_adaptor + inline scoped_allocator_adaptor(BOOST_RV_REF_BEG scoped_allocator_adaptor BOOST_RV_REF_END other) : base_type(::boost::move(other.base())) {} - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor) other) + inline scoped_allocator_adaptor &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor) other) { return static_cast(base_type::operator=(static_cast(other))); } - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor &operator=(BOOST_RV_REF(scoped_allocator_adaptor) other) + inline scoped_allocator_adaptor &operator=(BOOST_RV_REF(scoped_allocator_adaptor) other) { return static_cast(base_type::operator=(boost::move(other.base()))); } #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED @@ -734,13 +734,13 @@ class scoped_allocator_adaptor //! Returns: //! allocator_traits:: max_size(outer_allocator()). - BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW + inline size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW { return outer_traits_type::max_size(this->outer_allocator()); } //! Effects: //! calls OUTERMOST_ALLOC_TRAITS(*this):: destroy(OUTERMOST(*this), p). template - BOOST_CONTAINER_FORCEINLINE void destroy(T* p) BOOST_NOEXCEPT_OR_NOTHROW + inline void destroy(T* p) BOOST_NOEXCEPT_OR_NOTHROW { allocator_traits::type> ::destroy(get_outermost_allocator(this->outer_allocator()), p); @@ -748,17 +748,17 @@ class scoped_allocator_adaptor //! Returns: //! allocator_traits::allocate(outer_allocator(), n). - BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type n) + inline pointer allocate(size_type n) { return outer_traits_type::allocate(this->outer_allocator(), n); } //! Returns: //! allocator_traits::allocate(outer_allocator(), n, hint). - BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type n, const_void_pointer hint) + inline pointer allocate(size_type n, const_void_pointer hint) { return outer_traits_type::allocate(this->outer_allocator(), n, hint); } //! Effects: //! allocator_traits::deallocate(outer_allocator(), p, n). - BOOST_CONTAINER_FORCEINLINE void deallocate(pointer p, size_type n) + inline void deallocate(pointer p, size_type n) { outer_traits_type::deallocate(this->outer_allocator(), p, n); } #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED @@ -770,9 +770,9 @@ class scoped_allocator_adaptor #endif //BOOST_CONTAINER_DOXYGEN_INVOKED #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - BOOST_CONTAINER_FORCEINLINE base_type &base() { return *this; } + inline base_type &base() { return *this; } - BOOST_CONTAINER_FORCEINLINE const base_type &base() const { return *this; } + inline const base_type &base() const { return *this; } #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) @@ -806,7 +806,7 @@ class scoped_allocator_adaptor //! to true but the specific constructor does not take an allocator. This definition prevents a silent //! failure to pass an inner allocator to a contained element. -end note] template < typename T, class ...Args> - BOOST_CONTAINER_FORCEINLINE void construct(T* p, BOOST_FWD_REF(Args)...args) + inline void construct(T* p, BOOST_FWD_REF(Args)...args) { dtl::dispatch_uses_allocator ( (get_outermost_allocator)(this->outer_allocator()) @@ -819,7 +819,7 @@ class scoped_allocator_adaptor //overload selection problems when the first parameter is a pair. #define BOOST_CONTAINER_SCOPED_ALLOCATOR_CONSTRUCT_CODE(N) \ template < typename T BOOST_MOVE_I##N BOOST_MOVE_CLASSQ##N >\ - BOOST_CONTAINER_FORCEINLINE void construct(T* p BOOST_MOVE_I##N BOOST_MOVE_UREFQ##N)\ + inline void construct(T* p BOOST_MOVE_I##N BOOST_MOVE_UREFQ##N)\ {\ dtl::dispatch_uses_allocator\ ( (get_outermost_allocator)(this->outer_allocator())\ @@ -836,7 +836,7 @@ class scoped_allocator_adaptor public: //Internal function template - BOOST_CONTAINER_FORCEINLINE scoped_allocator_adaptor(internal_type_t, BOOST_FWD_REF(OuterA2) outer, const inner_allocator_type& inner) + inline scoped_allocator_adaptor(internal_type_t, BOOST_FWD_REF(OuterA2) outer, const inner_allocator_type& inner) : base_type(internal_type_t(), ::boost::forward(outer), inner) {} @@ -851,17 +851,17 @@ struct scoped_allocator_operator_equal //Optimize equal outer allocator types with //allocator_traits::equal which uses is_always_equal template - BOOST_CONTAINER_FORCEINLINE static bool equal_outer(const IA &l, const IA &r) + inline static bool equal_outer(const IA &l, const IA &r) { return allocator_traits::equal(l, r); } //Otherwise compare it normally template - BOOST_CONTAINER_FORCEINLINE static bool equal_outer(const IA1 &l, const IA2 &r) + inline static bool equal_outer(const IA1 &l, const IA2 &r) { return l == r; } //Otherwise compare it normally template - BOOST_CONTAINER_FORCEINLINE static bool equal_inner(const IA &l, const IA &r) + inline static bool equal_inner(const IA &l, const IA &r) { return allocator_traits::equal(l, r); } }; @@ -873,14 +873,14 @@ struct scoped_allocator_operator_equal //inner_allocator_type is the same as outer_allocator_type //so both types can be different in operator== template - BOOST_CONTAINER_FORCEINLINE static bool equal_inner(const IA1 &, const IA2 &) + inline static bool equal_inner(const IA1 &, const IA2 &) { return true; } }; /// @endcond template -BOOST_CONTAINER_FORCEINLINE bool operator==(const scoped_allocator_adaptor& a +inline bool operator==(const scoped_allocator_adaptor& a ,const scoped_allocator_adaptor& b) { #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) @@ -894,7 +894,7 @@ BOOST_CONTAINER_FORCEINLINE bool operator==(const scoped_allocator_adaptor -BOOST_CONTAINER_FORCEINLINE bool operator!=(const scoped_allocator_adaptor& a +inline bool operator!=(const scoped_allocator_adaptor& a ,const scoped_allocator_adaptor& b) { return !(a == b); } diff --git a/include/boost/container/set.hpp b/include/boost/container/set.hpp index f8a2efa..1aef8ff 100644 --- a/include/boost/container/set.hpp +++ b/include/boost/container/set.hpp @@ -113,7 +113,7 @@ class set //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE set() + inline set() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value && dtl::is_nothrow_default_constructible::value) : base_t() @@ -122,14 +122,14 @@ class set //! Effects: Constructs an empty set using the specified allocator object. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit set(const allocator_type& a) + inline explicit set(const allocator_type& a) : base_t(a) {} //! Effects: Constructs an empty set using the specified comparison object. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit set(const Compare& comp) + inline explicit set(const Compare& comp) : base_t(comp) {} @@ -137,7 +137,7 @@ class set //! and allocator. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE set(const Compare& comp, const allocator_type& a) + inline set(const Compare& comp, const allocator_type& a) : base_t(comp, a) {} @@ -147,7 +147,7 @@ class set //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last) + inline set(InputIterator first, InputIterator last) : base_t(true, first, last) {} @@ -157,7 +157,7 @@ class set //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const allocator_type& a) + inline set(InputIterator first, InputIterator last, const allocator_type& a) : base_t(true, first, last, key_compare(), a) {} @@ -167,7 +167,7 @@ class set //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const Compare& comp) + inline set(InputIterator first, InputIterator last, const Compare& comp) : base_t(true, first, last, comp) {} @@ -177,7 +177,7 @@ class set //! Complexity: Linear in N if the range [first ,last ) is already sorted using //! the predicate and otherwise N logN, where N is last - first. template - BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) + inline set(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : base_t(true, first, last, comp, a) {} @@ -192,7 +192,7 @@ class set //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last) + inline set( ordered_unique_range_t, InputIterator first, InputIterator last) : base_t(ordered_range, first, last) {} @@ -207,7 +207,7 @@ class set //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp ) + inline set( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp ) : base_t(ordered_range, first, last, comp) {} @@ -222,7 +222,7 @@ class set //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last + inline set( ordered_unique_range_t, InputIterator first, InputIterator last , const Compare& comp, const allocator_type& a) : base_t(ordered_range, first, last, comp, a) {} @@ -238,7 +238,7 @@ class set //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE set(ordered_unique_range_t, InputIterator first, InputIterator last, const allocator_type& a) + inline set(ordered_unique_range_t, InputIterator first, InputIterator last, const allocator_type& a) : base_t(ordered_range, first, last, Compare(), a) {} @@ -248,7 +248,7 @@ class set //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! the predicate and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE set(std::initializer_list il) + inline set(std::initializer_list il) : base_t(true, il.begin(), il.end()) {} @@ -257,7 +257,7 @@ class set //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! the predicate and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE set(std::initializer_list il, const allocator_type& a) + inline set(std::initializer_list il, const allocator_type& a) : base_t(true, il.begin(), il.end(), Compare(), a) {} @@ -266,7 +266,7 @@ class set //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! the predicate and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE set(std::initializer_list il, const Compare& comp ) + inline set(std::initializer_list il, const Compare& comp ) : base_t(true, il.begin(), il.end(), comp) {} @@ -275,7 +275,7 @@ class set //! //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using //! the predicate and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE set(std::initializer_list il, const Compare& comp, const allocator_type& a) + inline set(std::initializer_list il, const Compare& comp, const allocator_type& a) : base_t(true, il.begin(), il.end(), comp, a) {} @@ -289,7 +289,7 @@ class set //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list il) + inline set( ordered_unique_range_t, std::initializer_list il) : base_t(ordered_range, il.begin(), il.end()) {} @@ -303,7 +303,7 @@ class set //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list il, const Compare& comp) + inline set( ordered_unique_range_t, std::initializer_list il, const Compare& comp) : base_t(ordered_range, il.begin(), il.end(), comp) {} @@ -317,7 +317,7 @@ class set //! Complexity: Linear in N. //! //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) + inline set( ordered_unique_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) : base_t(ordered_range, il.begin(), il.end(), comp, a) {} #endif @@ -325,7 +325,7 @@ class set //! Effects: Copy constructs a set. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE set(const set& x) + inline set(const set& x) : base_t(static_cast(x)) {} @@ -334,7 +334,7 @@ class set //! Complexity: Constant. //! //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE set(BOOST_RV_REF(set) x) + inline set(BOOST_RV_REF(set) x) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : base_t(BOOST_MOVE_BASE(base_t, x)) {} @@ -342,7 +342,7 @@ class set //! Effects: Copy constructs a set using the specified allocator. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE set(const set& x, const allocator_type &a) + inline set(const set& x, const allocator_type &a) : base_t(static_cast(x), a) {} @@ -350,14 +350,14 @@ class set //! Constructs *this using x's resources. //! //! Complexity: Constant if a == x.get_allocator(), linear otherwise. - BOOST_CONTAINER_FORCEINLINE set(BOOST_RV_REF(set) x, const allocator_type &a) + inline set(BOOST_RV_REF(set) x, const allocator_type &a) : base_t(BOOST_MOVE_BASE(base_t, x), a) {} //! Effects: Makes *this a copy of x. //! //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE set& operator=(BOOST_COPY_ASSIGN_REF(set) x) + inline set& operator=(BOOST_COPY_ASSIGN_REF(set) x) { return static_cast(this->base_t::operator=(static_cast(x))); } //! Effects: this->swap(x.get()). @@ -368,7 +368,7 @@ class set //! Complexity: Constant if allocator_traits_type:: //! propagate_on_container_move_assignment is true or //! this->get>allocator() == x.get_allocator(). Linear otherwise. - BOOST_CONTAINER_FORCEINLINE set& operator=(BOOST_RV_REF(set) x) + inline set& operator=(BOOST_RV_REF(set) x) BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || allocator_traits_type::is_always_equal::value) && boost::container::dtl::is_nothrow_move_assignable::value) @@ -541,7 +541,7 @@ class set //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_FWD_REF(Args)... args) + inline std::pair emplace(BOOST_FWD_REF(Args)... args) { return this->base_t::emplace_unique(boost::forward(args)...); } //! Effects: Inserts an object of type Key constructed with @@ -554,18 +554,18 @@ class set //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) + inline iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) { return this->base_t::emplace_hint_unique(p, boost::forward(args)...); } #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #define BOOST_CONTAINER_SET_EMPLACE_CODE(N) \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_MOVE_UREF##N)\ + inline std::pair emplace(BOOST_MOVE_UREF##N)\ { return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ // BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SET_EMPLACE_CODE) @@ -632,7 +632,7 @@ class set //! //! Complexity: At most N log(size()+N) (N is the distance from first to last) template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) + inline void insert(InputIterator first, InputIterator last) { this->base_t::insert_unique_range(first, last); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) @@ -640,21 +640,21 @@ class set //! if there is no element with key equivalent to the key of that element. //! //! Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end()) - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) + inline void insert(std::initializer_list il) { this->base_t::insert_unique_range(il.begin(), il.end()); } #endif //! @copydoc ::boost::container::map::insert(node_type&&) - BOOST_CONTAINER_FORCEINLINE insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) + inline insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) { return this->base_t::insert_unique_node(boost::move(nh)); } //! @copydoc ::boost::container::map::insert(const_iterator, node_type&&) - BOOST_CONTAINER_FORCEINLINE insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) + inline insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) { return this->base_t::insert_unique_node(hint, boost::move(nh)); } //! @copydoc ::boost::container::map::merge(map&) template - BOOST_CONTAINER_FORCEINLINE void merge(set& source) + inline void merge(set& source) { typedef dtl::tree base2_t; @@ -663,12 +663,12 @@ class set //! @copydoc ::boost::container::set::merge(set&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG set BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG set BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } //! @copydoc ::boost::container::map::merge(multimap&) template - BOOST_CONTAINER_FORCEINLINE void merge(multiset& source) + inline void merge(multiset& source) { typedef dtl::tree base2_t; @@ -677,7 +677,7 @@ class set //! @copydoc ::boost::container::set::merge(multiset&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multiset BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG multiset BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } //! Effects: If present, erases the element in the container with key equivalent to x. @@ -685,7 +685,7 @@ class set //! Returns: Returns the number of erased elements (0/1). //! //! Complexity: log(size()) + count(k) - BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x) + inline size_type erase(const key_type& x) { return this->base_t::erase_unique(x); } #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) @@ -779,7 +779,7 @@ class set //! Returns: The number of elements with key equivalent to x. //! //! Complexity: log(size())+count(k) - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type count(const key_type& x) const { return static_cast(this->base_t::find(x) != this->base_t::cend()); } @@ -790,7 +790,7 @@ class set //! //! Complexity: log(size())+count(k) template - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type count(const K& x) const { return static_cast(this->find(x) != this->cend()); } @@ -881,13 +881,13 @@ class set //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). //! //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& x) + inline std::pair equal_range(const key_type& x) { return this->base_t::lower_bound_range(x); } //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). //! //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& x) const + inline std::pair equal_range(const key_type& x) const { return this->base_t::lower_bound_range(x); } //! Requires: This overload is available only if @@ -897,7 +897,7 @@ class set //! //! Complexity: Logarithmic template - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const K& x) + inline std::pair equal_range(const K& x) { return this->base_t::lower_bound_range(x); } //! Requires: This overload is available only if @@ -907,7 +907,7 @@ class set //! //! Complexity: Logarithmic template - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const K& x) const + inline std::pair equal_range(const K& x) const { return this->base_t::lower_bound_range(x); } #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) @@ -1097,48 +1097,48 @@ class multiset ////////////////////////////////////////////// //! @copydoc ::boost::container::set::set() - BOOST_CONTAINER_FORCEINLINE multiset() + inline multiset() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value && dtl::is_nothrow_default_constructible::value) : base_t() {} //! @copydoc ::boost::container::set::set(const allocator_type&) - BOOST_CONTAINER_FORCEINLINE explicit multiset(const allocator_type& a) + inline explicit multiset(const allocator_type& a) : base_t(a) {} //! @copydoc ::boost::container::set::set(const Compare&) - BOOST_CONTAINER_FORCEINLINE explicit multiset(const Compare& comp) + inline explicit multiset(const Compare& comp) : base_t(comp) {} //! @copydoc ::boost::container::set::set(const Compare&, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE multiset(const Compare& comp, const allocator_type& a) + inline multiset(const Compare& comp, const allocator_type& a) : base_t(comp, a) {} //! @copydoc ::boost::container::set::set(InputIterator, InputIterator) template - BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last) + inline multiset(InputIterator first, InputIterator last) : base_t(false, first, last) {} //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const allocator_type&) template - BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const allocator_type& a) + inline multiset(InputIterator first, InputIterator last, const allocator_type& a) : base_t(false, first, last, key_compare(), a) {} //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const Compare&) template - BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const Compare& comp) + inline multiset(InputIterator first, InputIterator last, const Compare& comp) : base_t(false, first, last, comp) {} //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const Compare&, const allocator_type&) template - BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) + inline multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : base_t(false, first, last, comp, a) {} @@ -1152,7 +1152,7 @@ class multiset //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last ) + inline multiset( ordered_range_t, InputIterator first, InputIterator last ) : base_t(ordered_range, first, last) {} @@ -1166,7 +1166,7 @@ class multiset //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) + inline multiset( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) : base_t(ordered_range, first, last, comp) {} @@ -1180,7 +1180,7 @@ class multiset //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) + inline multiset( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) : base_t(ordered_range, first, last, comp, a) {} @@ -1194,74 +1194,74 @@ class multiset //! //! Note: Non-standard extension. template - BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, InputIterator first, InputIterator last, const allocator_type &a) + inline multiset(ordered_range_t, InputIterator first, InputIterator last, const allocator_type &a) : base_t(ordered_range, first, last, Compare(), a) {} #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) //! @copydoc ::boost::container::set::set(std::initializer_list) - BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list il) + inline multiset(std::initializer_list il) : base_t(false, il.begin(), il.end()) {} //! @copydoc ::boost::container::set::set(std::initializer_list, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list il, const allocator_type& a) + inline multiset(std::initializer_list il, const allocator_type& a) : base_t(false, il.begin(), il.end(), Compare(), a) {} //! @copydoc ::boost::container::set::set(std::initializer_list, const Compare&) - BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list il, const Compare& comp) + inline multiset(std::initializer_list il, const Compare& comp) : base_t(false, il.begin(), il.end(), comp) {} //! @copydoc ::boost::container::set::set(std::initializer_list, const Compare&, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list il, const Compare& comp, const allocator_type& a) + inline multiset(std::initializer_list il, const Compare& comp, const allocator_type& a) : base_t(false, il.begin(), il.end(), comp, a) {} //! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list) - BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list il) + inline multiset(ordered_range_t, std::initializer_list il) : base_t(ordered_range, il.begin(), il.end()) {} //! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list, const Compare&) - BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list il, const Compare& comp) + inline multiset(ordered_range_t, std::initializer_list il, const Compare& comp) : base_t(ordered_range, il.begin(), il.end(), comp) {} //! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list, const Compare&, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) + inline multiset(ordered_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) : base_t(ordered_range, il.begin(), il.end(), comp, a) {} #endif //! @copydoc ::boost::container::set::set(const set &) - BOOST_CONTAINER_FORCEINLINE multiset(const multiset& x) + inline multiset(const multiset& x) : base_t(static_cast(x)) {} //! @copydoc ::boost::container::set::set(set &&) - BOOST_CONTAINER_FORCEINLINE multiset(BOOST_RV_REF(multiset) x) + inline multiset(BOOST_RV_REF(multiset) x) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : base_t(BOOST_MOVE_BASE(base_t, x)) {} //! @copydoc ::boost::container::set::set(const set &, const allocator_type &) - BOOST_CONTAINER_FORCEINLINE multiset(const multiset& x, const allocator_type &a) + inline multiset(const multiset& x, const allocator_type &a) : base_t(static_cast(x), a) {} //! @copydoc ::boost::container::set::set(set &&, const allocator_type &) - BOOST_CONTAINER_FORCEINLINE multiset(BOOST_RV_REF(multiset) x, const allocator_type &a) + inline multiset(BOOST_RV_REF(multiset) x, const allocator_type &a) : base_t(BOOST_MOVE_BASE(base_t, x), a) {} //! @copydoc ::boost::container::set::operator=(const set &) - BOOST_CONTAINER_FORCEINLINE multiset& operator=(BOOST_COPY_ASSIGN_REF(multiset) x) + inline multiset& operator=(BOOST_COPY_ASSIGN_REF(multiset) x) { return static_cast(this->base_t::operator=(static_cast(x))); } //! @copydoc ::boost::container::set::operator=(set &&) - BOOST_CONTAINER_FORCEINLINE multiset& operator=(BOOST_RV_REF(multiset) x) + inline multiset& operator=(BOOST_RV_REF(multiset) x) BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || allocator_traits_type::is_always_equal::value) && boost::container::dtl::is_nothrow_move_assignable::value) @@ -1342,7 +1342,7 @@ class multiset //! //! Complexity: Logarithmic. template - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args) + inline iterator emplace(BOOST_FWD_REF(Args)... args) { return this->base_t::emplace_equal(boost::forward(args)...); } //! Effects: Inserts an object of type Key constructed with @@ -1354,18 +1354,18 @@ class multiset //! Complexity: Logarithmic in general, but amortized constant if t //! is inserted right before p. template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) + inline iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) { return this->base_t::emplace_hint_equal(p, boost::forward(args)...); } #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #define BOOST_CONTAINER_MULTISET_EMPLACE_CODE(N) \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\ + inline iterator emplace(BOOST_MOVE_UREF##N)\ { return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\ \ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + inline iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ // BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MULTISET_EMPLACE_CODE) @@ -1423,26 +1423,26 @@ class multiset //! //! Complexity: At most N log(size()+N) (N is the distance from first to last) template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) + inline void insert(InputIterator first, InputIterator last) { this->base_t::insert_equal_range(first, last); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) //! @copydoc ::boost::container::set::insert(std::initializer_list) - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) + inline void insert(std::initializer_list il) { this->base_t::insert_equal_range(il.begin(), il.end()); } #endif //! @copydoc ::boost::container::multimap::insert(node_type&&) - BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) + inline iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) { return this->base_t::insert_equal_node(boost::move(nh)); } //! @copydoc ::boost::container::multimap::insert(const_iterator, node_type&&) - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) + inline iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) { return this->base_t::insert_equal_node(hint, boost::move(nh)); } //! @copydoc ::boost::container::multimap::merge(multimap&) template - BOOST_CONTAINER_FORCEINLINE void merge(multiset& source) + inline void merge(multiset& source) { typedef dtl::tree base2_t; @@ -1451,12 +1451,12 @@ class multiset //! @copydoc ::boost::container::multiset::merge(multiset&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multiset BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG multiset BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } //! @copydoc ::boost::container::multimap::merge(map&) template - BOOST_CONTAINER_FORCEINLINE void merge(set& source) + inline void merge(set& source) { typedef dtl::tree base2_t; @@ -1465,7 +1465,7 @@ class multiset //! @copydoc ::boost::container::multiset::merge(set&) template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG set BOOST_RV_REF_END source) + inline void merge(BOOST_RV_REF_BEG set BOOST_RV_REF_END source) { return this->merge(static_cast&>(source)); } #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) diff --git a/include/boost/container/slist.hpp b/include/boost/container/slist.hpp index b660172..5aa4193 100644 --- a/include/boost/container/slist.hpp +++ b/include/boost/container/slist.hpp @@ -466,7 +466,7 @@ class slist //! Throws: If allocator's copy constructor throws. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return allocator_type(this->node_alloc()); } @@ -477,7 +477,7 @@ class slist //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW { return this->node_alloc(); } @@ -488,7 +488,7 @@ class slist //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return this->node_alloc(); } @@ -505,7 +505,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator before_begin() BOOST_NOEXCEPT_OR_NOTHROW { return iterator(end()); } @@ -516,7 +516,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator before_begin() const BOOST_NOEXCEPT_OR_NOTHROW { return this->cbefore_begin(); } @@ -525,7 +525,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator begin() BOOST_NOEXCEPT_OR_NOTHROW { return iterator(this->icont().begin()); } @@ -534,7 +534,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW { return this->cbegin(); } @@ -543,7 +543,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator end() BOOST_NOEXCEPT_OR_NOTHROW { return iterator(this->icont().end()); } @@ -552,7 +552,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW { return this->cend(); } @@ -563,7 +563,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cbefore_begin() const BOOST_NOEXCEPT_OR_NOTHROW { return const_iterator(end()); } @@ -572,7 +572,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return const_iterator(this->non_const_icont().begin()); } @@ -581,7 +581,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW { return const_iterator(this->non_const_icont().end()); } @@ -594,7 +594,7 @@ class slist //! Complexity: Linear to the number of elements before i. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator previous(iterator p) BOOST_NOEXCEPT_OR_NOTHROW { return iterator(this->icont().previous(p.get())); } @@ -607,7 +607,7 @@ class slist //! Complexity: Linear to the number of elements before i. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator previous(const_iterator p) { return const_iterator(this->icont().previous(p.get())); } @@ -622,7 +622,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool empty() const { return !this->size(); } @@ -631,7 +631,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type size() const { return this->icont().size(); } @@ -640,7 +640,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type max_size() const { return AllocHolder::max_size(); } @@ -687,7 +687,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference front() { BOOST_ASSERT(!this->empty()); @@ -702,7 +702,7 @@ class slist //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference front() const { BOOST_ASSERT(!this->empty()); @@ -1538,35 +1538,35 @@ class slist //! Effects: Returns true if x and y are unequal //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator!=(const slist& x, const slist& y) { return !(x == y); } //! Effects: Returns true if x is less than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<(const slist& x, const slist& y) { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } //! Effects: Returns true if x is greater than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>(const slist& x, const slist& y) { return y < x; } //! Effects: Returns true if x is equal or less than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<=(const slist& x, const slist& y) { return !(y < x); } //! Effects: Returns true if x is equal or greater than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>=(const slist& x, const slist& y) { return !(x < y); } diff --git a/include/boost/container/small_vector.hpp b/include/boost/container/small_vector.hpp index a82dfa1..0045d06 100644 --- a/include/boost/container/small_vector.hpp +++ b/include/boost/container/small_vector.hpp @@ -130,10 +130,10 @@ class small_vector_allocator BOOST_COPYABLE_AND_MOVABLE(small_vector_allocator) - BOOST_CONTAINER_FORCEINLINE const allocator_type &as_base() const BOOST_NOEXCEPT + inline const allocator_type &as_base() const BOOST_NOEXCEPT { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE allocator_type &as_base() BOOST_NOEXCEPT + inline allocator_type &as_base() BOOST_NOEXCEPT { return static_cast(*this); } #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED @@ -171,19 +171,19 @@ class small_vector_allocator typedef typename allocator_traits::template portable_rebind_alloc::type other; }; - BOOST_CONTAINER_FORCEINLINE small_vector_allocator() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value) + inline small_vector_allocator() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value) {} //!Constructor from other small_vector_allocator. //!Never throws - BOOST_CONTAINER_FORCEINLINE small_vector_allocator + inline small_vector_allocator (const small_vector_allocator &other) BOOST_NOEXCEPT_OR_NOTHROW : allocator_type(other.as_base()) {} //!Move constructor from small_vector_allocator. //!Never throws - BOOST_CONTAINER_FORCEINLINE small_vector_allocator + inline small_vector_allocator (BOOST_RV_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW : allocator_type(::boost::move(other.as_base())) {} @@ -191,7 +191,7 @@ class small_vector_allocator //!Constructor from related small_vector_allocator. //!Never throws template - BOOST_CONTAINER_FORCEINLINE small_vector_allocator + inline small_vector_allocator (const small_vector_allocator &other) BOOST_NOEXCEPT_OR_NOTHROW : allocator_type(other.as_base()) {} @@ -199,52 +199,52 @@ class small_vector_allocator //!Move constructor from related small_vector_allocator. //!Never throws template - BOOST_CONTAINER_FORCEINLINE small_vector_allocator + inline small_vector_allocator (BOOST_RV_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW : allocator_type(::boost::move(other.as_base())) {} //!Constructor from allocator_type. //!Never throws - BOOST_CONTAINER_FORCEINLINE explicit small_vector_allocator + inline explicit small_vector_allocator (const allocator_type &other) BOOST_NOEXCEPT_OR_NOTHROW : allocator_type(other) {} //!Assignment from other small_vector_allocator. //!Never throws - BOOST_CONTAINER_FORCEINLINE small_vector_allocator & + inline small_vector_allocator & operator=(BOOST_COPY_ASSIGN_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW { return static_cast(this->allocator_type::operator=(other.as_base())); } //!Move assignment from other small_vector_allocator. //!Never throws - BOOST_CONTAINER_FORCEINLINE small_vector_allocator & + inline small_vector_allocator & operator=(BOOST_RV_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW { return static_cast(this->allocator_type::operator=(::boost::move(other.as_base()))); } //!Assignment from related small_vector_allocator. //!Never throws template - BOOST_CONTAINER_FORCEINLINE small_vector_allocator & + inline small_vector_allocator & operator=(BOOST_COPY_ASSIGN_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW { return static_cast(this->allocator_type::operator=(other.as_base())); } //!Move assignment from related small_vector_allocator. //!Never throws template - BOOST_CONTAINER_FORCEINLINE small_vector_allocator & + inline small_vector_allocator & operator=(BOOST_RV_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW { return static_cast(this->allocator_type::operator=(::boost::move(other.as_base()))); } //!Move assignment from allocator_type. //!Never throws - BOOST_CONTAINER_FORCEINLINE small_vector_allocator & + inline small_vector_allocator & operator=(const allocator_type &other) BOOST_NOEXCEPT_OR_NOTHROW { return static_cast(this->allocator_type::operator=(other)); } //!Allocates storage from the standard-conforming allocator - BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type count, const_void_pointer hint = const_void_pointer()) + inline pointer allocate(size_type count, const_void_pointer hint = const_void_pointer()) { return allocator_traits_type::allocate(this->as_base(), count, hint); } //!Deallocates previously allocated memory. @@ -257,7 +257,7 @@ class small_vector_allocator //!Returns the maximum number of elements that could be allocated. //!Never throws - BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW + inline size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW { return allocator_traits_type::max_size(this->as_base()); } small_vector_allocator select_on_container_copy_construction() const @@ -268,17 +268,17 @@ class small_vector_allocator //!Swaps two allocators, does nothing //!because this small_vector_allocator is stateless - BOOST_CONTAINER_FORCEINLINE friend void swap(small_vector_allocator &l, small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW + inline friend void swap(small_vector_allocator &l, small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW { boost::adl_move_swap(l.as_base(), r.as_base()); } //!An small_vector_allocator always compares to true, as memory allocated with one //!instance can be deallocated by another instance (except for unpropagable storage) - BOOST_CONTAINER_FORCEINLINE friend bool operator==(const small_vector_allocator &l, const small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW + inline friend bool operator==(const small_vector_allocator &l, const small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW { return allocator_traits_type::equal(l.as_base(), r.as_base()); } //!An small_vector_allocator always compares to false, as memory allocated with one //!instance can be deallocated by another instance - BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const small_vector_allocator &l, const small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW + inline friend bool operator!=(const small_vector_allocator &l, const small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW { return !(l == r); } #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED @@ -288,12 +288,12 @@ class small_vector_allocator typedef typename dtl::vector_for_small_vector ::type vector_type; - BOOST_CONTAINER_FORCEINLINE bool is_internal_storage(const_pointer p) const + inline bool is_internal_storage(const_pointer p) const { return this->internal_storage() == p; } public: - BOOST_CONTAINER_FORCEINLINE const_pointer internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW; - BOOST_CONTAINER_FORCEINLINE pointer internal_storage() BOOST_NOEXCEPT_OR_NOTHROW; + inline const_pointer internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW; + inline pointer internal_storage() BOOST_NOEXCEPT_OR_NOTHROW; #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED }; @@ -362,11 +362,11 @@ class small_vector_base friend class small_vector_allocator; - BOOST_CONTAINER_FORCEINLINE + inline const_pointer internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW { return this->base_type::get_stored_allocator().internal_storage(); } - BOOST_CONTAINER_FORCEINLINE + inline pointer internal_storage() BOOST_NOEXCEPT_OR_NOTHROW { return this->base_type::get_stored_allocator().internal_storage(); } @@ -378,16 +378,16 @@ class small_vector_base protected: - BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(initial_capacity_t, std::size_t initial_capacity) + inline explicit small_vector_base(initial_capacity_t, std::size_t initial_capacity) : base_type(initial_capacity_t(), this->internal_storage(), initial_capacity) {} template - BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(initial_capacity_t, std::size_t capacity, BOOST_FWD_REF(AllocFwd) a) + inline explicit small_vector_base(initial_capacity_t, std::size_t capacity, BOOST_FWD_REF(AllocFwd) a) : base_type(initial_capacity_t(), this->internal_storage(), capacity, ::boost::forward(a)) {} - BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(maybe_initial_capacity_t, std::size_t initial_capacity, std::size_t initial_size) + inline explicit small_vector_base(maybe_initial_capacity_t, std::size_t initial_capacity, std::size_t initial_size) : base_type( maybe_initial_capacity_t() , (initial_capacity >= initial_size) ? this->internal_storage() : pointer() , (initial_capacity >= initial_size) ? initial_capacity : initial_size @@ -395,7 +395,7 @@ class small_vector_base {} template - BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(maybe_initial_capacity_t, std::size_t initial_capacity, std::size_t initial_size, BOOST_FWD_REF(AllocFwd) a) + inline explicit small_vector_base(maybe_initial_capacity_t, std::size_t initial_capacity, std::size_t initial_size, BOOST_FWD_REF(AllocFwd) a) : base_type(maybe_initial_capacity_t() , (initial_capacity >= initial_size) ? this->internal_storage() : pointer() , (initial_capacity >= initial_size) ? initial_capacity : initial_size @@ -409,13 +409,13 @@ class small_vector_base #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED public: - BOOST_CONTAINER_FORCEINLINE small_vector_base& operator=(BOOST_COPY_ASSIGN_REF(small_vector_base) other) + inline small_vector_base& operator=(BOOST_COPY_ASSIGN_REF(small_vector_base) other) { return static_cast(this->base_type::operator=(static_cast(other))); } - BOOST_CONTAINER_FORCEINLINE small_vector_base& operator=(BOOST_RV_REF(small_vector_base) other) + inline small_vector_base& operator=(BOOST_RV_REF(small_vector_base) other) { return static_cast(this->base_type::operator=(BOOST_MOVE_BASE(base_type, other))); } - BOOST_CONTAINER_FORCEINLINE void swap(small_vector_base &other) + inline void swap(small_vector_base &other) { return this->base_type::swap(other); } #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED @@ -462,7 +462,7 @@ struct small_vector_storage_strawman //Internal storage hack template -BOOST_CONTAINER_FORCEINLINE typename small_vector_allocator::const_pointer +inline typename small_vector_allocator::const_pointer small_vector_allocator::internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW { typedef small_vector_storage_strawman strawman_t; @@ -486,7 +486,7 @@ BOOST_CONTAINER_FORCEINLINE typename small_vector_allocator -BOOST_CONTAINER_FORCEINLINE typename small_vector_allocator::pointer +inline typename small_vector_allocator::pointer small_vector_allocator::internal_storage() BOOST_NOEXCEPT_OR_NOTHROW { typedef small_vector_storage_strawman strawman_t; @@ -544,7 +544,7 @@ class small_vector typedef typename base_type::size_type size_type; typedef typename base_type::value_type value_type; - BOOST_CONTAINER_FORCEINLINE static std::size_t internal_capacity() + inline static std::size_t internal_capacity() { return static_capacity; } typedef allocator_traits allocator_traits_type; @@ -555,41 +555,41 @@ class small_vector static const size_type static_capacity = small_vector_storage_definer::type::sms_size; public: - BOOST_CONTAINER_FORCEINLINE small_vector() + inline small_vector() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value) : base_type(initial_capacity_t(), internal_capacity()) {} - BOOST_CONTAINER_FORCEINLINE explicit small_vector(const allocator_type &a) + inline explicit small_vector(const allocator_type &a) : base_type(initial_capacity_t(), internal_capacity(), a) {} - BOOST_CONTAINER_FORCEINLINE explicit small_vector(size_type n) + inline explicit small_vector(size_type n) : base_type(maybe_initial_capacity_t(), internal_capacity(), n) { this->protected_init_n(n, value_init); } - BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const allocator_type &a) + inline small_vector(size_type n, const allocator_type &a) : base_type(maybe_initial_capacity_t(), internal_capacity(), n, a) { this->protected_init_n(n, value_init); } - BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, default_init_t) + inline small_vector(size_type n, default_init_t) : base_type(maybe_initial_capacity_t(), internal_capacity(), n) { this->protected_init_n(n, default_init_t()); } - BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, default_init_t, const allocator_type &a) + inline small_vector(size_type n, default_init_t, const allocator_type &a) : base_type(maybe_initial_capacity_t(), internal_capacity(), n, a) { this->protected_init_n(n, default_init_t()); } - BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const value_type &v) + inline small_vector(size_type n, const value_type &v) : base_type(maybe_initial_capacity_t(), internal_capacity(), n) { this->protected_init_n(n, v); } - BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const value_type &v, const allocator_type &a) + inline small_vector(size_type n, const value_type &v, const allocator_type &a) : base_type(maybe_initial_capacity_t(), internal_capacity(), n, a) { this->protected_init_n(n, v); } template - BOOST_CONTAINER_FORCEINLINE small_vector(InIt first, InIt last + inline small_vector(InIt first, InIt last BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c < dtl::is_convertible::value BOOST_MOVE_I dtl::nat >::type * = 0) @@ -598,7 +598,7 @@ class small_vector { this->assign(first, last); } template - BOOST_CONTAINER_FORCEINLINE small_vector(InIt first, InIt last, const allocator_type& a + inline small_vector(InIt first, InIt last, const allocator_type& a BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c < dtl::is_convertible::value BOOST_MOVE_I dtl::nat >::type * = 0) @@ -606,57 +606,57 @@ class small_vector : base_type(initial_capacity_t(), internal_capacity(), a) { this->assign(first, last); } - BOOST_CONTAINER_FORCEINLINE small_vector(const small_vector &other) + inline small_vector(const small_vector &other) : base_type( initial_capacity_t(), internal_capacity() , allocator_traits_type::select_on_container_copy_construction(other.get_stored_allocator())) { this->assign(other.cbegin(), other.cend()); } - BOOST_CONTAINER_FORCEINLINE small_vector(const small_vector &other, const allocator_type &a) + inline small_vector(const small_vector &other, const allocator_type &a) : base_type(initial_capacity_t(), internal_capacity(), a) { this->assign(other.cbegin(), other.cend()); } - BOOST_CONTAINER_FORCEINLINE explicit small_vector(const base_type &other) + inline explicit small_vector(const base_type &other) : base_type( initial_capacity_t(), internal_capacity() , allocator_traits_type::select_on_container_copy_construction(other.get_stored_allocator())) { this->assign(other.cbegin(), other.cend()); } - BOOST_CONTAINER_FORCEINLINE explicit small_vector(BOOST_RV_REF(base_type) other) + inline explicit small_vector(BOOST_RV_REF(base_type) other) : base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator())) { this->base_type::move_construct_impl(other); } - BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other) + inline small_vector(BOOST_RV_REF(small_vector) other) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator())) { this->base_type::move_construct_impl(other); } - BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other, const allocator_type &a) + inline small_vector(BOOST_RV_REF(small_vector) other, const allocator_type &a) : base_type(initial_capacity_t(), internal_capacity(), a) { this->base_type::move_construct_impl(other); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - BOOST_CONTAINER_FORCEINLINE small_vector(std::initializer_list il, const allocator_type& a = allocator_type()) + inline small_vector(std::initializer_list il, const allocator_type& a = allocator_type()) : base_type(initial_capacity_t(), internal_capacity(), a) { this->assign(il.begin(), il.end()); } #endif - BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_COPY_ASSIGN_REF(small_vector) other) + inline small_vector& operator=(BOOST_COPY_ASSIGN_REF(small_vector) other) { return static_cast(this->base_type::operator=(static_cast(other))); } - BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_RV_REF(small_vector) other) + inline small_vector& operator=(BOOST_RV_REF(small_vector) other) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_assignable::value && (allocator_traits_type::propagate_on_container_move_assignment::value || allocator_traits_type::is_always_equal::value)) { return static_cast(this->base_type::operator=(BOOST_MOVE_BASE(base_type, other))); } - BOOST_CONTAINER_FORCEINLINE small_vector& operator=(const base_type &other) + inline small_vector& operator=(const base_type &other) { return static_cast(this->base_type::operator=(other)); } - BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_RV_REF(base_type) other) + inline small_vector& operator=(BOOST_RV_REF(base_type) other) { return static_cast(this->base_type::operator=(boost::move(other))); } - BOOST_CONTAINER_FORCEINLINE void swap(small_vector &other) + inline void swap(small_vector &other) { return this->base_type::swap(other); } }; diff --git a/include/boost/container/stable_vector.hpp b/include/boost/container/stable_vector.hpp index bf1c7f1..0ab37b9 100644 --- a/include/boost/container/stable_vector.hpp +++ b/include/boost/container/stable_vector.hpp @@ -81,14 +81,14 @@ template class clear_on_destroy { public: - BOOST_CONTAINER_FORCEINLINE clear_on_destroy(C &c) + inline clear_on_destroy(C &c) : c_(c), do_clear_(true) {} - BOOST_CONTAINER_FORCEINLINE void release() + inline void release() { do_clear_ = false; } - BOOST_CONTAINER_FORCEINLINE ~clear_on_destroy() + inline ~clear_on_destroy() { if(do_clear_){ c_.clear(); @@ -122,11 +122,11 @@ struct node_base ::type node_base_ptr_ptr; public: - BOOST_CONTAINER_FORCEINLINE explicit node_base(const node_base_ptr_ptr &n) + inline explicit node_base(const node_base_ptr_ptr &n) : up(n) {} - BOOST_CONTAINER_FORCEINLINE node_base() + inline node_base() : up() {} @@ -152,11 +152,11 @@ struct node ::value>::type storage_t; storage_t m_storage; - BOOST_CONTAINER_FORCEINLINE explicit node(const typename hook_type::node_base_ptr_ptr &n) + inline explicit node(const typename hook_type::node_base_ptr_ptr &n) : hook_type(n) {} - BOOST_CONTAINER_FORCEINLINE node() + inline node() {} #if defined(BOOST_GCC) && (BOOST_GCC >= 40600) && (BOOST_GCC < 80000) @@ -165,19 +165,19 @@ struct node #define BOOST_CONTAINER_DISABLE_ALIASING_WARNING # endif - BOOST_CONTAINER_FORCEINLINE T &get_data() + inline T &get_data() { return *boost::move_detail::force_ptr(this->m_storage.data); } - BOOST_CONTAINER_FORCEINLINE const T &get_data() const + inline const T &get_data() const { return *boost::move_detail::force_ptr(this->m_storage.data); } - BOOST_CONTAINER_FORCEINLINE T *get_data_ptr() + inline T *get_data_ptr() { return boost::move_detail::force_ptr(this->m_storage.data); } - BOOST_CONTAINER_FORCEINLINE const T *get_data_ptr() const + inline const T *get_data_ptr() const { return boost::move_detail::force_ptr(this->m_storage.data); } - BOOST_CONTAINER_FORCEINLINE ~node() + inline ~node() { boost::move_detail::force_ptr(this->m_storage.data)->~T(); } #if defined(BOOST_CONTAINER_DISABLE_ALIASING_WARNING) @@ -185,7 +185,7 @@ struct node #undef BOOST_CONTAINER_DISABLE_ALIASING_WARNING # endif - BOOST_CONTAINER_FORCEINLINE void destroy_header() + inline void destroy_header() { static_cast(this)->~hook_type(); } }; @@ -221,7 +221,7 @@ struct index_traits // Node cache first is *(this->index.end() - 2); // Node cache last is this->index.back(); - BOOST_CONTAINER_FORCEINLINE static node_base_ptr_ptr ptr_to_node_base_ptr(node_base_ptr &n) + inline static node_base_ptr_ptr ptr_to_node_base_ptr(node_base_ptr &n) { return node_base_ptr_ptr_traits::pointer_to(n); } static void fix_up_pointers(index_iterator first, index_iterator last) @@ -234,10 +234,10 @@ struct index_traits } } - BOOST_CONTAINER_FORCEINLINE static index_iterator get_fix_up_end(index_type &index) + inline static index_iterator get_fix_up_end(index_type &index) { return index.end() - (ExtraPointers - 1); } - BOOST_CONTAINER_FORCEINLINE static void fix_up_pointers_from(index_type & index, index_iterator first) + inline static void fix_up_pointers_from(index_type & index, index_iterator first) { index_traits::fix_up_pointers(first, index_traits::get_fix_up_end(index)); } static void readjust_end_node(index_type &index, node_base_type &end_node) @@ -327,72 +327,72 @@ class stable_vector_iterator public: - BOOST_CONTAINER_FORCEINLINE explicit stable_vector_iterator(node_base_ptr p) BOOST_NOEXCEPT_OR_NOTHROW + inline explicit stable_vector_iterator(node_base_ptr p) BOOST_NOEXCEPT_OR_NOTHROW : m_pn(p) {} - BOOST_CONTAINER_FORCEINLINE stable_vector_iterator() BOOST_NOEXCEPT_OR_NOTHROW + inline stable_vector_iterator() BOOST_NOEXCEPT_OR_NOTHROW : m_pn() //Value initialization to achieve "null iterators" (N3644) {} - BOOST_CONTAINER_FORCEINLINE stable_vector_iterator(const stable_vector_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW + inline stable_vector_iterator(const stable_vector_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW : m_pn(other.node_pointer()) {} - BOOST_CONTAINER_FORCEINLINE stable_vector_iterator(const nonconst_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW + inline stable_vector_iterator(const nonconst_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW : m_pn(other.node_pointer()) {} - BOOST_CONTAINER_FORCEINLINE stable_vector_iterator & operator=(const stable_vector_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW + inline stable_vector_iterator & operator=(const stable_vector_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW { m_pn = other.node_pointer(); return *this; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline node_ptr node_pointer() const BOOST_NOEXCEPT_OR_NOTHROW { return node_ptr_traits::static_cast_from(m_pn); } public: //Pointer like operators - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW { return node_pointer()->get_data(); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW { return ptr_traits::pointer_to(this->operator*()); } //Increment / Decrement - BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW + inline stable_vector_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW { node_base_ptr_ptr p(this->m_pn->up); this->m_pn = *(++p); return *this; } - BOOST_CONTAINER_FORCEINLINE stable_vector_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW + inline stable_vector_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW { stable_vector_iterator tmp(*this); ++*this; return stable_vector_iterator(tmp); } - BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW + inline stable_vector_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW { node_base_ptr_ptr p(this->m_pn->up); this->m_pn = *(--p); return *this; } - BOOST_CONTAINER_FORCEINLINE stable_vector_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW + inline stable_vector_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW { stable_vector_iterator tmp(*this); --*this; return stable_vector_iterator(tmp); } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW { return node_ptr_traits::static_cast_from(this->m_pn->up[off])->get_data(); } //Arithmetic - BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW + inline stable_vector_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW { if(off) this->m_pn = this->m_pn->up[off]; return *this; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend stable_vector_iterator operator+(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW { stable_vector_iterator tmp(left); @@ -400,7 +400,7 @@ class stable_vector_iterator return tmp; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend stable_vector_iterator operator+(difference_type off, const stable_vector_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW { stable_vector_iterator tmp(right); @@ -408,10 +408,10 @@ class stable_vector_iterator return tmp; } - BOOST_CONTAINER_FORCEINLINE stable_vector_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW + inline stable_vector_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW { *this += -off; return *this; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend stable_vector_iterator operator-(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW { stable_vector_iterator tmp(left); @@ -420,32 +420,32 @@ class stable_vector_iterator } //Difference - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend difference_type operator-(const stable_vector_iterator &left, const stable_vector_iterator &right) BOOST_NOEXCEPT_OR_NOTHROW { return left.m_pn->up - right.m_pn->up; } //Comparison operators - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator== (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return l.m_pn == r.m_pn; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator!= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return l.m_pn != r.m_pn; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator< (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return l.m_pn->up < r.m_pn->up; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return l.m_pn->up <= r.m_pn->up; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator> (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return l.m_pn->up > r.m_pn->up; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW { return l.m_pn->up >= r.m_pn->up; } }; @@ -554,16 +554,16 @@ class stable_vector allocator_version_traits allocator_version_traits_t; typedef typename allocator_version_traits_t::multiallocation_chain multiallocation_chain; - BOOST_CONTAINER_FORCEINLINE node_ptr allocate_one() + inline node_ptr allocate_one() { return allocator_version_traits_t::allocate_one(this->priv_node_alloc()); } - BOOST_CONTAINER_FORCEINLINE void deallocate_one(const node_ptr &p) + inline void deallocate_one(const node_ptr &p) { allocator_version_traits_t::deallocate_one(this->priv_node_alloc(), p); } - BOOST_CONTAINER_FORCEINLINE void allocate_individual(typename allocator_traits_type::size_type n, multiallocation_chain &m) + inline void allocate_individual(typename allocator_traits_type::size_type n, multiallocation_chain &m) { allocator_version_traits_t::allocate_individual(this->priv_node_alloc(), n, m); } - BOOST_CONTAINER_FORCEINLINE void deallocate_individual(multiallocation_chain &holder) + inline void deallocate_individual(multiallocation_chain &holder) { allocator_version_traits_t::deallocate_individual(this->priv_node_alloc(), holder); } friend class stable_vector_detail::clear_on_destroy; @@ -619,7 +619,7 @@ class stable_vector //! Throws: If allocator_type's default constructor throws. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE stable_vector() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value) + inline stable_vector() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value) : internal_data(), index() { BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; @@ -630,7 +630,7 @@ class stable_vector //! Throws: Nothing //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit stable_vector(const allocator_type& al) BOOST_NOEXCEPT_OR_NOTHROW + inline explicit stable_vector(const allocator_type& al) BOOST_NOEXCEPT_OR_NOTHROW : internal_data(al), index(al) { BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; @@ -777,7 +777,7 @@ class stable_vector //! Throws: If allocator_type's copy constructor throws. //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE stable_vector(BOOST_RV_REF(stable_vector) x) BOOST_NOEXCEPT_OR_NOTHROW + inline stable_vector(BOOST_RV_REF(stable_vector) x) BOOST_NOEXCEPT_OR_NOTHROW : internal_data(boost::move(x.priv_node_alloc())), index(boost::move(x.index)) { this->priv_swap_members(x); @@ -918,7 +918,7 @@ class stable_vector //! Throws: If memory allocation throws or T's copy constructor throws. //! //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE void assign(size_type n, const T& t) + inline void assign(size_type n, const T& t) { typedef constant_iterator cvalue_iterator; this->assign(cvalue_iterator(t, n), cvalue_iterator()); @@ -957,7 +957,7 @@ class stable_vector //! Throws: If memory allocation throws or //! T's constructor from dereferencing initializer_list iterator throws. //! - BOOST_CONTAINER_FORCEINLINE void assign(std::initializer_list il) + inline void assign(std::initializer_list il) { BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; assign(il.begin(), il.end()); @@ -969,7 +969,7 @@ class stable_vector //! Throws: If allocator's copy constructor throws. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline allocator_type get_allocator() const { return this->priv_node_alloc(); } @@ -980,7 +980,7 @@ class stable_vector //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_node_alloc(); } @@ -991,7 +991,7 @@ class stable_vector //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_node_alloc(); } @@ -1006,7 +1006,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator begin() BOOST_NOEXCEPT_OR_NOTHROW { return (this->index.empty()) ? this->end(): iterator(node_ptr_traits::static_cast_from(this->index.front())); } @@ -1015,7 +1015,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW { return (this->index.empty()) ? this->cend() : const_iterator(node_ptr_traits::static_cast_from(this->index.front())) ; } @@ -1024,7 +1024,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator end() BOOST_NOEXCEPT_OR_NOTHROW { return iterator(this->priv_get_end_node()); } @@ -1033,7 +1033,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW { return const_iterator(this->priv_get_end_node()); } @@ -1043,7 +1043,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW { return reverse_iterator(this->end()); } @@ -1053,7 +1053,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return const_reverse_iterator(this->end()); } @@ -1063,7 +1063,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW { return reverse_iterator(this->begin()); } @@ -1073,7 +1073,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW { return const_reverse_iterator(this->begin()); } @@ -1082,7 +1082,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return this->begin(); } @@ -1091,7 +1091,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW { return this->end(); } @@ -1101,7 +1101,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return this->rbegin(); } @@ -1111,7 +1111,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crend()const BOOST_NOEXCEPT_OR_NOTHROW { return this->rend(); } @@ -1126,7 +1126,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool empty() const BOOST_NOEXCEPT_OR_NOTHROW { return this->index.size() <= ExtraPointers; } @@ -1135,7 +1135,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type size() const BOOST_NOEXCEPT_OR_NOTHROW { const size_type index_size = this->index.size(); @@ -1147,7 +1147,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW { return this->index.max_size() - ExtraPointers; } @@ -1207,7 +1207,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW { const size_type index_size = this->index.size(); @@ -1295,7 +1295,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference front() BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1310,7 +1310,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1325,7 +1325,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference back() BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1340,7 +1340,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1355,7 +1355,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(this->size() > n); @@ -1370,7 +1370,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(this->size() > n); @@ -1388,7 +1388,7 @@ class stable_vector //! Complexity: Constant. //! //! Note: Non-standard extension - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(this->size() >= n); @@ -1406,7 +1406,7 @@ class stable_vector //! Complexity: Constant. //! //! Note: Non-standard extension - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(this->size() >= n); @@ -1423,7 +1423,7 @@ class stable_vector //! Complexity: Constant. //! //! Note: Non-standard extension - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_index_of(p.node_pointer()); } @@ -1437,7 +1437,7 @@ class stable_vector //! Complexity: Constant. //! //! Note: Non-standard extension - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_index_of(p.node_pointer()); } @@ -1449,7 +1449,7 @@ class stable_vector //! Throws: range_error if n >= size() //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference at(size_type n) { if(n >= this->size()){ @@ -1466,7 +1466,7 @@ class stable_vector //! Throws: range_error if n >= size() //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference at(size_type n)const { if(n >= this->size()){ @@ -1626,7 +1626,7 @@ class stable_vector //! Returns: an iterator to the first inserted element or p if first == last. //! //! Complexity: Linear to distance [il.begin(), il.end()). - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, std::initializer_list il) + inline iterator insert(const_iterator p, std::initializer_list il) { //Position checks done by insert() BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; @@ -1713,7 +1713,7 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Constant time. - BOOST_CONTAINER_FORCEINLINE void pop_back() BOOST_NOEXCEPT_OR_NOTHROW + inline void pop_back() BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); this->erase(--this->cend()); @@ -1725,7 +1725,7 @@ class stable_vector //! //! Complexity: Linear to the elements between p and the //! last element. Constant if p is the last element. - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW + inline iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(this->priv_in_range(p)); BOOST_CONTAINER_STABLE_VECTOR_CHECK_INVARIANT; @@ -1797,55 +1797,55 @@ class stable_vector //! Throws: Nothing. //! //! Complexity: Linear to the number of elements in the stable_vector. - BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW + inline void clear() BOOST_NOEXCEPT_OR_NOTHROW { this->erase(this->cbegin(),this->cend()); } //! Effects: Returns true if x and y are equal //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator==(const stable_vector& x, const stable_vector& y) { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } //! Effects: Returns true if x and y are unequal //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator!=(const stable_vector& x, const stable_vector& y) { return !(x == y); } //! Effects: Returns true if x is less than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<(const stable_vector& x, const stable_vector& y) { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } //! Effects: Returns true if x is greater than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>(const stable_vector& x, const stable_vector& y) { return y < x; } //! Effects: Returns true if x is equal or less than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator<=(const stable_vector& x, const stable_vector& y) { return !(y < x); } //! Effects: Returns true if x is equal or greater than y //! //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline friend bool operator>=(const stable_vector& x, const stable_vector& y) { return !(x < y); } //! Effects: x.swap(y) //! //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE friend void swap(stable_vector& x, stable_vector& y) + inline friend void swap(stable_vector& x, stable_vector& y) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y))) { x.swap(y); } @@ -1857,12 +1857,12 @@ class stable_vector return (this->begin() <= pos) && (pos < this->end()); } - BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const + inline bool priv_in_range_or_end(const_iterator pos) const { return (this->begin() <= pos) && (pos <= this->end()); } - BOOST_CONTAINER_FORCEINLINE size_type priv_index_of(node_ptr p) const + inline size_type priv_index_of(node_ptr p) const { //Check range BOOST_ASSERT(this->index.empty() || (this->index.data() <= p->up)); @@ -1896,18 +1896,18 @@ class stable_vector class push_back_rollback { public: - BOOST_CONTAINER_FORCEINLINE push_back_rollback(stable_vector &sv, const node_ptr &p) + inline push_back_rollback(stable_vector &sv, const node_ptr &p) : m_sv(sv), m_p(p) {} - BOOST_CONTAINER_FORCEINLINE ~push_back_rollback() + inline ~push_back_rollback() { if(m_p){ m_sv.priv_put_in_pool(m_p); } } - BOOST_CONTAINER_FORCEINLINE void release() + inline void release() { m_p = node_ptr(); } private: @@ -1937,7 +1937,7 @@ class stable_vector return index_beg + (difference_type)idx; } - BOOST_CONTAINER_FORCEINLINE bool priv_capacity_bigger_than_size() const + inline bool priv_capacity_bigger_than_size() const { return this->index.capacity() > this->index.size() && this->internal_data.pool_size > 0; @@ -2070,16 +2070,16 @@ class stable_vector return ret; } - BOOST_CONTAINER_FORCEINLINE node_base_ptr priv_get_end_node() const + inline node_base_ptr priv_get_end_node() const { return node_base_ptr_traits::pointer_to(const_cast(this->internal_data.end_node)); } - BOOST_CONTAINER_FORCEINLINE void priv_destroy_node(const node_type &n) + inline void priv_destroy_node(const node_type &n) { allocator_traits:: destroy(this->priv_node_alloc(), &n); } - BOOST_CONTAINER_FORCEINLINE void priv_delete_node(const node_ptr &n) + inline void priv_delete_node(const node_ptr &n) { this->priv_destroy_node(*n); this->priv_put_in_pool(n); diff --git a/include/boost/container/static_vector.hpp b/include/boost/container/static_vector.hpp index ddc12d4..b3d3b4f 100644 --- a/include/boost/container/static_vector.hpp +++ b/include/boost/container/static_vector.hpp @@ -40,12 +40,12 @@ class static_storage_allocator { typedef bool_ throw_on_overflow_t; - static BOOST_NORETURN BOOST_CONTAINER_FORCEINLINE void on_capacity_overflow(true_type) + static BOOST_NORETURN inline void on_capacity_overflow(true_type) { (throw_bad_alloc)(); } - static BOOST_CONTAINER_FORCEINLINE void on_capacity_overflow(false_type) + static inline void on_capacity_overflow(false_type) { BOOST_ASSERT_MSG(false, "ERROR: static vector capacity overflow"); } @@ -53,19 +53,19 @@ class static_storage_allocator public: typedef T value_type; - BOOST_CONTAINER_FORCEINLINE static_storage_allocator() BOOST_NOEXCEPT_OR_NOTHROW + inline static_storage_allocator() BOOST_NOEXCEPT_OR_NOTHROW {} - BOOST_CONTAINER_FORCEINLINE static_storage_allocator(const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW + inline static_storage_allocator(const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW {} - BOOST_CONTAINER_FORCEINLINE static_storage_allocator & operator=(const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW + inline static_storage_allocator & operator=(const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW { return *this; } - BOOST_CONTAINER_FORCEINLINE T* internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW + inline T* internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW { return const_cast(static_cast(static_cast(storage.data))); } - BOOST_CONTAINER_FORCEINLINE T* internal_storage() BOOST_NOEXCEPT_OR_NOTHROW + inline T* internal_storage() BOOST_NOEXCEPT_OR_NOTHROW { return static_cast(static_cast(storage.data)); } static const std::size_t internal_capacity = N; @@ -73,17 +73,17 @@ class static_storage_allocator std::size_t max_size() const { return N; } - static BOOST_CONTAINER_FORCEINLINE void on_capacity_overflow() + static inline void on_capacity_overflow() { (on_capacity_overflow)(throw_on_overflow_t()); } typedef boost::container::dtl::version_type version; - BOOST_CONTAINER_FORCEINLINE friend bool operator==(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW + inline friend bool operator==(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW { return false; } - BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW + inline friend bool operator!=(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW { return true; } private: @@ -199,7 +199,7 @@ public: //! //! @par Complexity //! Constant O(1). - BOOST_CONTAINER_FORCEINLINE static_vector() BOOST_NOEXCEPT_OR_NOTHROW + inline static_vector() BOOST_NOEXCEPT_OR_NOTHROW : base_t() {} @@ -215,7 +215,7 @@ public: //! //! @par Complexity //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE explicit static_vector(size_type count) + inline explicit static_vector(size_type count) : base_t(count) {} @@ -234,7 +234,7 @@ public: //! //! @par Note //! Non-standard extension - BOOST_CONTAINER_FORCEINLINE static_vector(size_type count, default_init_t) + inline static_vector(size_type count, default_init_t) : base_t(count, default_init_t()) {} @@ -251,7 +251,7 @@ public: //! //! @par Complexity //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector(size_type count, value_type const& value) + inline static_vector(size_type count, value_type const& value) : base_t(count, value) {} @@ -271,7 +271,7 @@ public: //! @par Complexity //! Linear O(N). template - BOOST_CONTAINER_FORCEINLINE static_vector(Iterator first, Iterator last) + inline static_vector(Iterator first, Iterator last) : base_t(first, last) {} @@ -289,7 +289,7 @@ public: //! //! @par Complexity //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector(std::initializer_list il) + inline static_vector(std::initializer_list il) : base_t(il) {} #endif @@ -303,20 +303,20 @@ public: //! //! @par Complexity //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector(static_vector const& other) + inline static_vector(static_vector const& other) : base_t(other) {} - BOOST_CONTAINER_FORCEINLINE static_vector(static_vector const& other, const allocator_type &) + inline static_vector(static_vector const& other, const allocator_type &) : base_t(other) {} - BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF(static_vector) other, const allocator_type &) + inline static_vector(BOOST_RV_REF(static_vector) other, const allocator_type &) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : base_t(BOOST_MOVE_BASE(base_t, other)) {} - BOOST_CONTAINER_FORCEINLINE explicit static_vector(const allocator_type &) + inline explicit static_vector(const allocator_type &) : base_t() {} @@ -333,7 +333,7 @@ public: //! @par Complexity //! Linear O(N). template - BOOST_CONTAINER_FORCEINLINE static_vector(static_vector const& other) + inline static_vector(static_vector const& other) : base_t(other) {} @@ -347,7 +347,7 @@ public: //! //! @par Complexity //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF(static_vector) other) + inline static_vector(BOOST_RV_REF(static_vector) other) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible::value) : base_t(BOOST_MOVE_BASE(base_t, other)) {} @@ -366,7 +366,7 @@ public: //! @par Complexity //! Linear O(N). template - BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF_BEG static_vector BOOST_RV_REF_END other) + inline static_vector(BOOST_RV_REF_BEG static_vector BOOST_RV_REF_END other) : base_t(BOOST_MOVE_BASE(typename static_vector::base_t, other)) {} @@ -379,7 +379,7 @@ public: //! //! @par Complexity //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_COPY_ASSIGN_REF(static_vector) other) + inline static_vector & operator=(BOOST_COPY_ASSIGN_REF(static_vector) other) { return static_cast(base_t::operator=(static_cast(other))); } @@ -395,7 +395,7 @@ public: //! //! @par Complexity //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector & operator=(std::initializer_list il) + inline static_vector & operator=(std::initializer_list il) { return static_cast(base_t::operator=(il)); } #endif @@ -412,7 +412,7 @@ public: //! @par Complexity //! Linear O(N). template - BOOST_CONTAINER_FORCEINLINE static_vector & operator=(static_vector const& other) + inline static_vector & operator=(static_vector const& other) { return static_cast(base_t::operator= (static_cast::base_t const&>(other))); @@ -428,7 +428,7 @@ public: //! //! @par Complexity //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_RV_REF(static_vector) other) + inline static_vector & operator=(BOOST_RV_REF(static_vector) other) BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_assignable::value) { return static_cast(base_t::operator=(BOOST_MOVE_BASE(base_t, other))); @@ -448,7 +448,7 @@ public: //! @par Complexity //! Linear O(N). template - BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_RV_REF_BEG static_vector BOOST_RV_REF_END other) + inline static_vector & operator=(BOOST_RV_REF_BEG static_vector BOOST_RV_REF_END other) { return static_cast(base_t::operator= (BOOST_MOVE_BASE(typename static_vector::base_t, other))); @@ -1155,7 +1155,7 @@ public: //! //! @par Complexity //! Constant O(1). - BOOST_CONTAINER_FORCEINLINE static size_type capacity() BOOST_NOEXCEPT_OR_NOTHROW + inline static size_type capacity() BOOST_NOEXCEPT_OR_NOTHROW { return static_capacity; } //! @brief Returns container's capacity. @@ -1167,7 +1167,7 @@ public: //! //! @par Complexity //! Constant O(1). - BOOST_CONTAINER_FORCEINLINE static size_type max_size() BOOST_NOEXCEPT_OR_NOTHROW + inline static size_type max_size() BOOST_NOEXCEPT_OR_NOTHROW { return static_capacity; } #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED @@ -1196,7 +1196,7 @@ public: bool empty() const BOOST_NOEXCEPT_OR_NOTHROW; #else - BOOST_CONTAINER_FORCEINLINE friend void swap(static_vector &x, static_vector &y) + inline friend void swap(static_vector &x, static_vector &y) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y))) { x.swap(y); diff --git a/include/boost/container/string.hpp b/include/boost/container/string.hpp index b43d9f8..fc332d3 100644 --- a/include/boost/container/string.hpp +++ b/include/boost/container/string.hpp @@ -103,31 +103,31 @@ class basic_string_base typedef ::boost::intrusive::pointer_traits pointer_traits; - BOOST_CONTAINER_FORCEINLINE basic_string_base() + inline basic_string_base() : members_() {} - BOOST_CONTAINER_FORCEINLINE explicit basic_string_base(const allocator_type& a) + inline explicit basic_string_base(const allocator_type& a) : members_(a) {} - BOOST_CONTAINER_FORCEINLINE explicit basic_string_base(BOOST_RV_REF(allocator_type) a) + inline explicit basic_string_base(BOOST_RV_REF(allocator_type) a) : members_(boost::move(a)) {} - BOOST_CONTAINER_FORCEINLINE basic_string_base(const allocator_type& a, size_type n) + inline basic_string_base(const allocator_type& a, size_type n) : members_(a) { this->allocate_initial_block(n); } - BOOST_CONTAINER_FORCEINLINE explicit basic_string_base(size_type n) + inline explicit basic_string_base(size_type n) : members_() { this->allocate_initial_block(n); } - BOOST_CONTAINER_FORCEINLINE ~basic_string_base() + inline ~basic_string_base() { if(!this->is_short()){ this->deallocate(this->priv_long_addr(), this->priv_long_storage()); @@ -149,15 +149,15 @@ class basic_string_base size_type storage; pointer start; - BOOST_CONTAINER_FORCEINLINE long_t() + inline long_t() : is_short(0) {} - BOOST_CONTAINER_FORCEINLINE long_t(size_type len, size_type stor, pointer ptr) + inline long_t(size_type len, size_type stor, pointer ptr) : is_short(0), length(len), storage(stor), start(ptr) {} - BOOST_CONTAINER_FORCEINLINE long_t(const long_t &other) + inline long_t(const long_t &other) { this->is_short = false; length = other.length; @@ -165,7 +165,7 @@ class basic_string_base start = other.start; } - BOOST_CONTAINER_FORCEINLINE long_t &operator= (const long_t &other) + inline long_t &operator= (const long_t &other) { length = other.length; storage = other.storage; @@ -226,41 +226,41 @@ class basic_string_base struct members_holder : public allocator_type { - BOOST_CONTAINER_FORCEINLINE void init() + inline void init() { short_t &s = *::new(this->m_repr.data) short_t; s.h.is_short = 1; s.h.length = 0; } - BOOST_CONTAINER_FORCEINLINE members_holder() + inline members_holder() : allocator_type() { this->init(); } template - BOOST_CONTAINER_FORCEINLINE explicit members_holder(BOOST_FWD_REF(AllocatorConvertible) a) + inline explicit members_holder(BOOST_FWD_REF(AllocatorConvertible) a) : allocator_type(boost::forward(a)) { this->init(); } - BOOST_CONTAINER_FORCEINLINE const short_t *pshort_repr() const + inline const short_t *pshort_repr() const { return move_detail::force_ptr(m_repr.data); } - BOOST_CONTAINER_FORCEINLINE const long_t *plong_repr() const + inline const long_t *plong_repr() const { return move_detail::force_ptr(m_repr.data); } - BOOST_CONTAINER_FORCEINLINE short_t *pshort_repr() + inline short_t *pshort_repr() { return move_detail::force_ptr(m_repr.data); } - BOOST_CONTAINER_FORCEINLINE long_t *plong_repr() + inline long_t *plong_repr() { return move_detail::force_ptr(m_repr.data); } repr_t m_repr; } members_; - BOOST_CONTAINER_FORCEINLINE const allocator_type &alloc() const + inline const allocator_type &alloc() const { return members_; } - BOOST_CONTAINER_FORCEINLINE allocator_type &alloc() + inline allocator_type &alloc() { return members_; } static const size_type InternalBufferChars = (sizeof(repr_t) - ShortDataOffset)/sizeof(value_type); @@ -270,7 +270,7 @@ class basic_string_base static const size_type MinAllocation = InternalBufferChars*2; protected: - BOOST_CONTAINER_FORCEINLINE bool is_short() const + inline bool is_short() const { //Access and copy (to avoid UB) the first byte of the union to know if the //active representation is short or long @@ -280,14 +280,14 @@ class basic_string_base return hdr.is_short != 0; } - BOOST_CONTAINER_FORCEINLINE short_t *construct_short() + inline short_t *construct_short() { short_t *ps = ::new(this->members_.m_repr.data) short_t; ps->h.is_short = 1; return ps; } - BOOST_CONTAINER_FORCEINLINE void destroy_short() + inline void destroy_short() { BOOST_ASSERT(this->is_short()); this->members_.pshort_repr()->~short_t(); @@ -302,14 +302,14 @@ class basic_string_base return this->members_.pshort_repr(); } - BOOST_CONTAINER_FORCEINLINE long_t *construct_long() + inline long_t *construct_long() { long_t *pl = ::new(this->members_.m_repr.data) long_t; //is_short flag is written in the constructor return pl; } - BOOST_CONTAINER_FORCEINLINE void destroy_long() + inline void destroy_long() { BOOST_ASSERT(!this->is_short()); this->members_.plong_repr()->~long_t(); @@ -355,15 +355,6 @@ class basic_string_base this->alloc().deallocate(p, n); } - BOOST_CONTAINER_FORCEINLINE void construct(pointer p, const value_type &value = value_type()) - { - allocator_traits_type::construct - ( this->alloc() - , boost::movelib::to_raw_pointer(p) - , value - ); - } - void destroy(pointer p, size_type n) { value_type *raw_p = boost::movelib::to_raw_pointer(p); @@ -372,7 +363,7 @@ class basic_string_base } } - BOOST_CONTAINER_FORCEINLINE void destroy(pointer p) + inline void destroy(pointer p) { allocator_traits_type::destroy ( this->alloc() @@ -399,17 +390,17 @@ class basic_string_base } } - BOOST_CONTAINER_FORCEINLINE void deallocate_block() + inline void deallocate_block() { this->deallocate(this->priv_addr(), this->priv_storage()); } - BOOST_CONTAINER_FORCEINLINE size_type max_size() const + inline size_type max_size() const { return allocator_traits_type::max_size(this->alloc()) - 1; } protected: - BOOST_CONTAINER_FORCEINLINE size_type priv_capacity() const + inline size_type priv_capacity() const { return this->priv_storage() - 1; } - BOOST_CONTAINER_FORCEINLINE pointer priv_short_addr() const + inline pointer priv_short_addr() const { return pointer_traits::pointer_to(const_cast(this->members_.pshort_repr()->data[0])); } //GCC seems a bit confused about uninitialized accesses @@ -418,10 +409,10 @@ class basic_string_base #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #endif - BOOST_CONTAINER_FORCEINLINE pointer priv_long_addr() const + inline pointer priv_long_addr() const { return this->members_.plong_repr()->start; } - BOOST_CONTAINER_FORCEINLINE pointer priv_addr() const + inline pointer priv_addr() const { return this->is_short() ? priv_short_addr() @@ -429,7 +420,7 @@ class basic_string_base ; } - BOOST_CONTAINER_FORCEINLINE pointer priv_end_addr() const + inline pointer priv_end_addr() const { return this->is_short() ? this->priv_short_addr() + difference_type(this->priv_short_size()) @@ -437,39 +428,39 @@ class basic_string_base ; } - BOOST_CONTAINER_FORCEINLINE void priv_long_addr(pointer addr) + inline void priv_long_addr(pointer addr) { this->members_.plong_repr()->start = addr; } - BOOST_CONTAINER_FORCEINLINE size_type priv_storage() const + inline size_type priv_storage() const { return this->is_short() ? priv_short_storage() : priv_long_storage(); } - BOOST_CONTAINER_FORCEINLINE size_type priv_short_storage() const + inline size_type priv_short_storage() const { return InternalBufferChars; } - BOOST_CONTAINER_FORCEINLINE size_type priv_long_storage() const + inline size_type priv_long_storage() const { return this->members_.plong_repr()->storage; } - BOOST_CONTAINER_FORCEINLINE void priv_storage(size_type storage) + inline void priv_storage(size_type storage) { if(!this->is_short()) this->priv_long_storage(storage); } - BOOST_CONTAINER_FORCEINLINE void priv_long_storage(size_type storage) + inline void priv_long_storage(size_type storage) { this->members_.plong_repr()->storage = storage; } - BOOST_CONTAINER_FORCEINLINE size_type priv_size() const + inline size_type priv_size() const { return this->is_short() ? this->priv_short_size() : this->priv_long_size(); } - BOOST_CONTAINER_FORCEINLINE size_type priv_short_size() const + inline size_type priv_short_size() const { return this->members_.pshort_repr()->h.length; } - BOOST_CONTAINER_FORCEINLINE size_type priv_long_size() const + inline size_type priv_long_size() const { return this->members_.plong_repr()->length; } - BOOST_CONTAINER_FORCEINLINE void priv_size(size_type sz) + inline void priv_size(size_type sz) { if(this->is_short()) this->priv_short_size(sz); @@ -477,7 +468,7 @@ class basic_string_base this->priv_long_size(sz); } - BOOST_CONTAINER_FORCEINLINE void priv_short_size(size_type sz) + inline void priv_short_size(size_type sz) { typedef unsigned char uchar_type; static const uchar_type mask = uchar_type(uchar_type(-1) >> 1U); @@ -486,7 +477,7 @@ class basic_string_base this->members_.pshort_repr()->h.length = uchar_type(uchar_type(sz) & mask); } - BOOST_CONTAINER_FORCEINLINE void priv_long_size(size_type sz) + inline void priv_long_size(size_type sz) { static const size_type mask = size_type(-1) >> 1U; BOOST_ASSERT( sz <= mask ); @@ -978,7 +969,7 @@ class basic_string //! Throws: If allocator's copy constructor throws. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return this->alloc(); } @@ -989,7 +980,7 @@ class basic_string //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW { return this->alloc(); } @@ -1000,7 +991,7 @@ class basic_string //! Complexity: Constant. //! //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW { return this->alloc(); } @@ -1015,7 +1006,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator begin() BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_addr(); } @@ -1024,7 +1015,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_addr(); } @@ -1033,7 +1024,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline iterator end() BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_end_addr(); } @@ -1042,7 +1033,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_end_addr(); } @@ -1052,7 +1043,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW { return reverse_iterator(this->priv_end_addr()); } @@ -1062,7 +1053,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return this->crbegin(); } @@ -1072,7 +1063,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW { return reverse_iterator(this->priv_addr()); } @@ -1082,7 +1073,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW { return this->crend(); } @@ -1091,7 +1082,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_addr(); } @@ -1100,7 +1091,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_end_addr(); } @@ -1110,7 +1101,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW { return const_reverse_iterator(this->priv_end_addr()); } @@ -1120,7 +1111,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW { return const_reverse_iterator(this->priv_addr()); } @@ -1135,7 +1126,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool empty() const BOOST_NOEXCEPT_OR_NOTHROW { return !this->priv_size(); } @@ -1144,7 +1135,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type size() const BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_size(); } @@ -1153,7 +1144,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type length() const BOOST_NOEXCEPT_OR_NOTHROW { return this->size(); } @@ -1162,7 +1153,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW { return base_t::max_size(); } @@ -1202,7 +1193,7 @@ class basic_string if (n <= this->size()) this->erase(this->begin() + difference_type(n), this->end()); else{ - this->priv_reserve(n, false); + this->priv_reserve_no_null_end(n); this->priv_size(n); this->priv_terminate_string(); } @@ -1214,7 +1205,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW { return this->priv_capacity(); } @@ -1274,7 +1265,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference front() BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1289,7 +1280,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1304,7 +1295,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference back() BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1319,7 +1310,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(!this->empty()); @@ -1334,7 +1325,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(this->size() > n); @@ -1349,7 +1340,7 @@ class basic_string //! Throws: Nothing. //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW { BOOST_ASSERT(this->size() > n); @@ -1364,7 +1355,7 @@ class basic_string //! Throws: range_error if n >= size() //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline reference at(size_type n) { if (n >= this->size()) @@ -1380,7 +1371,7 @@ class basic_string //! Throws: range_error if n >= size() //! //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline const_reference at(size_type n) const { if (n >= this->size()) throw_out_of_range("basic_string::at invalid subscript"); @@ -1900,7 +1891,7 @@ class basic_string //! //! Returns: An iterator which refers to the copy of the first inserted //! character, or p if i1 is empty. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, std::initializer_list il) + inline iterator insert(const_iterator p, std::initializer_list il) { return this->insert(p, il.begin(), il.end()); } @@ -2019,7 +2010,7 @@ class basic_string //! Effects: Calls `return replace(pos1, n1, sv.data(), sv.size());`. //! template class BasicStringView> - BOOST_CONTAINER_FORCEINLINE basic_string& replace(size_type pos1, size_type n1, BasicStringView sv) + inline basic_string& replace(size_type pos1, size_type n1, BasicStringView sv) { return this->replace(pos1, n1, sv.data(), sv.size()); } @@ -2096,7 +2087,7 @@ class basic_string //! if the length of the resulting string would exceed max_size() //! //! Returns: *this - BOOST_CONTAINER_FORCEINLINE basic_string& replace(size_type pos, size_type n1, const CharT* s) + inline basic_string& replace(size_type pos, size_type n1, const CharT* s) { return this->replace(pos, n1, s, Traits::length(s)); } @@ -2127,7 +2118,7 @@ class basic_string //! Throws: if memory allocation throws //! //! Returns: *this - BOOST_CONTAINER_FORCEINLINE basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str) + inline basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str) { return this->replace(i1, i2, str.data(), str.data()+str.size()); } //! Requires: [begin(),i1) and [i1,i2) are valid ranges and @@ -2138,7 +2129,7 @@ class basic_string //! Throws: if memory allocation throws //! //! Returns: *this - BOOST_CONTAINER_FORCEINLINE basic_string& replace(const_iterator i1, const_iterator i2, const CharT* s, size_type n) + inline basic_string& replace(const_iterator i1, const_iterator i2, const CharT* s, size_type n) { return this->replace(i1, i2, s, s + difference_type(n)); } //! Requires: [begin(),i1) and [i1,i2) are valid ranges and s points to an @@ -2149,7 +2140,7 @@ class basic_string //! Throws: if memory allocation throws //! //! Returns: *this - BOOST_CONTAINER_FORCEINLINE basic_string& replace(const_iterator i1, const_iterator i2, const CharT* s) + inline basic_string& replace(const_iterator i1, const_iterator i2, const CharT* s) { return this->replace(i1, i2, s, s + Traits::length(s)); } //! Requires: [begin(),i1) and [i1,i2) are valid ranges. @@ -2234,7 +2225,7 @@ class basic_string //! //! Returns: *this. template