diff --git a/bench/detail/varray.hpp b/bench/detail/varray.hpp index 9189e1b..454ba18 100644 --- a/bench/detail/varray.hpp +++ b/bench/detail/varray.hpp @@ -41,8 +41,6 @@ #include #include -#include - #ifndef BOOST_NO_EXCEPTIONS #include #endif // BOOST_NO_EXCEPTIONS diff --git a/example/doc_custom_deque.cpp b/example/doc_custom_deque.cpp index 004796e..014193d 100644 --- a/example/doc_custom_deque.cpp +++ b/example/doc_custom_deque.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// //[doc_custom_deque #include -#include //Make sure assertions are active #ifdef NDEBUG diff --git a/example/doc_custom_devector.cpp b/example/doc_custom_devector.cpp index 91ab670..31b7597 100644 --- a/example/doc_custom_devector.cpp +++ b/example/doc_custom_devector.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// //[doc_custom_devector #include -#include //Make sure assertions are active #ifdef NDEBUG @@ -29,7 +28,7 @@ int main () //Size-optimized devector is smaller than the default one. typedef devector, size_option_t > size_optimized_devector_t; - BOOST_STATIC_ASSERT(( sizeof(size_optimized_devector_t) < sizeof(devector) )); + assert(( sizeof(size_optimized_devector_t) < sizeof(devector) )); //Requesting capacity for more elements than representable by "unsigned char" is an error bool exception_thrown = false; diff --git a/example/doc_custom_small_vector.cpp b/example/doc_custom_small_vector.cpp index 55fe961..f42e5c6 100644 --- a/example/doc_custom_small_vector.cpp +++ b/example/doc_custom_small_vector.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// //[doc_custom_small_vector #include -#include //Make sure assertions are active #ifdef NDEBUG diff --git a/example/doc_custom_static_vector.cpp b/example/doc_custom_static_vector.cpp index 817ec4c..3d62b07 100644 --- a/example/doc_custom_static_vector.cpp +++ b/example/doc_custom_static_vector.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// //[doc_custom_static_vector #include -#include //Make sure assertions are active #ifdef NDEBUG diff --git a/example/doc_custom_vector.cpp b/example/doc_custom_vector.cpp index c8db0bb..ef7371c 100644 --- a/example/doc_custom_vector.cpp +++ b/example/doc_custom_vector.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// //[doc_custom_vector #include -#include //Make sure assertions are active #ifdef NDEBUG @@ -27,7 +26,7 @@ int main () //Size-optimized vector is smaller than the default one. typedef vector, size_option_t > size_optimized_vector_t; - BOOST_STATIC_ASSERT(( sizeof(size_optimized_vector_t) < sizeof(vector) )); + assert(( sizeof(size_optimized_vector_t) < sizeof(vector) )); //Requesting capacity for more elements than representable by "unsigned char" //is an error in the size optimized vector. diff --git a/include/boost/container/adaptive_pool.hpp b/include/boost/container/adaptive_pool.hpp index fb0e24b..9b10cb4 100644 --- a/include/boost/container/adaptive_pool.hpp +++ b/include/boost/container/adaptive_pool.hpp @@ -34,7 +34,6 @@ #include #include -#include #include #include @@ -77,7 +76,7 @@ class adaptive_pool static const std::size_t overhead_percent = OverheadPercent; static const std::size_t real_nodes_per_block = NodesPerBlock; - BOOST_CONTAINER_DOCIGN(BOOST_STATIC_ASSERT((Version <=2))); + BOOST_CONTAINER_DOCIGN(BOOST_CONTAINER_STATIC_ASSERT((Version <=2))); public: //------- @@ -254,7 +253,7 @@ class adaptive_pool //!Elements must be individually deallocated with deallocate() void allocate_many(size_type elem_size, std::size_t n_elements, multiallocation_chain &chain) { - BOOST_STATIC_ASSERT(( Version > 1 ));/* + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 ));/* dlmalloc_memchain ch; BOOST_CONTAINER_MEMCHAIN_INIT(&ch); if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){ @@ -275,7 +274,7 @@ class adaptive_pool //!Elements must be individually deallocated with deallocate() void allocate_many(const size_type *elem_sizes, size_type n_elements, multiallocation_chain &chain) { - BOOST_STATIC_ASSERT(( Version > 1 ));/* + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 ));/* dlmalloc_memchain ch; BOOST_CONTAINER_MEMCHAIN_INIT(&ch); if(BOOST_UNLIKELY(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){ @@ -390,7 +389,7 @@ class private_adaptive_pool static const std::size_t overhead_percent = OverheadPercent; static const std::size_t real_nodes_per_block = NodesPerBlock; - BOOST_CONTAINER_DOCIGN(BOOST_STATIC_ASSERT((Version <=2))); + BOOST_CONTAINER_DOCIGN(BOOST_CONTAINER_STATIC_ASSERT((Version <=2))); typedef dtl::private_adaptive_node_pool pool_t; @@ -546,7 +545,7 @@ class private_adaptive_pool //!Elements must be individually deallocated with deallocate() void allocate_many(size_type elem_size, std::size_t n_elements, multiallocation_chain &chain) { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes ( n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS , move_detail::force_ptr(&chain)))){ @@ -558,7 +557,7 @@ class private_adaptive_pool //!Elements must be individually deallocated with deallocate() void allocate_many(const size_type *elem_sizes, size_type n_elements, multiallocation_chain &chain) { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); if(BOOST_UNLIKELY(!dlmalloc_multialloc_arrays (n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS , move_detail::force_ptr(&chain)))){ diff --git a/include/boost/container/allocator.hpp b/include/boost/container/allocator.hpp index 45feaf1..33c2a8a 100644 --- a/include/boost/container/allocator.hpp +++ b/include/boost/container/allocator.hpp @@ -26,7 +26,6 @@ #include #include #include -#include #include @@ -120,10 +119,10 @@ class allocator BOOST_CONTAINER_ALLOCATE_NEW | BOOST_CONTAINER_EXPAND_BWD | BOOST_CONTAINER_EXPAND_FWD ; //The mask can't disable all the allocation types - BOOST_STATIC_ASSERT(( (AllocationDisableMask & ForbiddenMask) != ForbiddenMask )); + BOOST_CONTAINER_STATIC_ASSERT(( (AllocationDisableMask & ForbiddenMask) != ForbiddenMask )); //The mask is only valid for version 2 allocators - BOOST_STATIC_ASSERT(( Version != 1 || (AllocationDisableMask == 0) )); + BOOST_CONTAINER_STATIC_ASSERT(( Version != 1 || (AllocationDisableMask == 0) )); #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED @@ -227,7 +226,7 @@ class allocator size_type &prefer_in_recvd_out_size, pointer &reuse) { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); const allocation_type mask(AllocationDisableMask); command &= ~mask; pointer ret = this->priv_allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); @@ -243,7 +242,7 @@ class allocator //!This function is available only with Version == 2 BOOST_CONTAINER_ATTRIBUTE_NODISCARD size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); return dlmalloc_size(p); } @@ -253,7 +252,7 @@ class allocator //!This function is available only with Version == 2 BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline pointer allocate_one() { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); return this->allocate(1); } @@ -262,7 +261,7 @@ class allocator //!This function is available only with Version == 2 inline void allocate_individual(std::size_t num_elements, multiallocation_chain &chain) { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); this->allocate_many(1, num_elements, chain); } @@ -272,7 +271,7 @@ class allocator //Never throws void deallocate_one(pointer p) BOOST_NOEXCEPT_OR_NOTHROW { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); return this->deallocate(p, 1); } @@ -281,7 +280,7 @@ class allocator inline void deallocate_individual(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); return this->deallocate_many(chain); } @@ -290,7 +289,7 @@ class allocator //!This function is available only with Version == 2 void allocate_many(size_type elem_size, std::size_t n_elements, multiallocation_chain &chain) { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); dlmalloc_memchain ch; BOOST_CONTAINER_MEMCHAIN_INIT(&ch); if(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch)){ @@ -312,7 +311,7 @@ class allocator //!This function is available only with Version == 2 void allocate_many(const size_type *elem_sizes, size_type n_elements, multiallocation_chain &chain) { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); dlmalloc_memchain ch; BOOST_CONTAINER_MEMCHAIN_INIT(&ch); if(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch)){ @@ -334,7 +333,7 @@ class allocator //!This function is available only with Version == 2 void deallocate_many(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); dlmalloc_memchain ch; void *beg(&*chain.begin()), *last(&*chain.last()); size_t size(chain.size()); diff --git a/include/boost/container/allocator_traits.hpp b/include/boost/container/allocator_traits.hpp index f9a219a..cdb6683 100644 --- a/include/boost/container/allocator_traits.hpp +++ b/include/boost/container/allocator_traits.hpp @@ -44,8 +44,6 @@ #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #include #endif -// other boost -#include #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED diff --git a/include/boost/container/deque.hpp b/include/boost/container/deque.hpp index 3265a42..157c900 100644 --- a/include/boost/container/deque.hpp +++ b/include/boost/container/deque.hpp @@ -75,7 +75,7 @@ struct deque_value_traits template struct deque_block_size { - BOOST_STATIC_ASSERT_MSG(!(BlockBytes && BlockSize), "BlockBytes and BlockSize can't be specified at the same time"); + BOOST_CONTAINER_STATIC_ASSERT_MSG(!(BlockBytes && BlockSize), "BlockBytes and BlockSize can't be specified at the same time"); static const std::size_t block_bytes = BlockBytes ? BlockBytes : 512u; static const std::size_t value = BlockSize ? BlockSize : (sizeof(T) < block_bytes ? (block_bytes/sizeof(T)) : std::size_t(1)); }; diff --git a/include/boost/container/detail/iterators.hpp b/include/boost/container/detail/iterators.hpp index 4d97eb3..57ffb0c 100644 --- a/include/boost/container/detail/iterators.hpp +++ b/include/boost/container/detail/iterators.hpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -868,7 +867,7 @@ class iterator_from_iiterator 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)); + BOOST_CONTAINER_STATIC_ASSERT((is_bidirectional_iterator::value)); --this->m_iit; return *this; } diff --git a/include/boost/container/detail/math_functions.hpp b/include/boost/container/detail/math_functions.hpp index 8d350a1..b84ef6a 100644 --- a/include/boost/container/detail/math_functions.hpp +++ b/include/boost/container/detail/math_functions.hpp @@ -28,7 +28,6 @@ #include #include -#include namespace boost { namespace container { @@ -128,7 +127,7 @@ inline std::size_t floor_log2 (std::size_t x) { const std::size_t Bits = sizeof(std::size_t)*CHAR_BIT; const bool Size_t_Bits_Power_2= !(Bits & (Bits-1)); - BOOST_STATIC_ASSERT(((Size_t_Bits_Power_2)== true)); + BOOST_CONTAINER_STATIC_ASSERT(((Size_t_Bits_Power_2)== true)); std::size_t n = x; std::size_t log2 = 0; diff --git a/include/boost/container/detail/next_capacity.hpp b/include/boost/container/detail/next_capacity.hpp index 66d6e8b..76bf0a0 100644 --- a/include/boost/container/detail/next_capacity.hpp +++ b/include/boost/container/detail/next_capacity.hpp @@ -26,8 +26,6 @@ // container/detail #include -#include - namespace boost { namespace container { namespace dtl { @@ -35,10 +33,10 @@ namespace dtl { template struct grow_factor_ratio { - BOOST_STATIC_ASSERT(Numerator > Denominator); - BOOST_STATIC_ASSERT(Numerator < 100); - BOOST_STATIC_ASSERT(Denominator < 100); - BOOST_STATIC_ASSERT(Denominator == 1 || (0 != Numerator % Denominator)); + BOOST_CONTAINER_STATIC_ASSERT(Numerator > Denominator); + BOOST_CONTAINER_STATIC_ASSERT(Numerator < 100); + BOOST_CONTAINER_STATIC_ASSERT(Denominator < 100); + BOOST_CONTAINER_STATIC_ASSERT(Denominator == 1 || (0 != Numerator % Denominator)); template SizeType operator()(const SizeType cur_cap, const SizeType add_min_cap, const SizeType max_cap) const diff --git a/include/boost/container/detail/node_alloc_holder.hpp b/include/boost/container/detail/node_alloc_holder.hpp index 5daa2f1..1ebf21a 100644 --- a/include/boost/container/detail/node_alloc_holder.hpp +++ b/include/boost/container/detail/node_alloc_holder.hpp @@ -505,7 +505,7 @@ struct node_alloc_holder typename NodeAlloc::multiallocation_chain chain; allocator_node_destroyer_and_chain_builder builder(this->node_alloc(), chain); this->icont().clear_and_dispose(builder); - //BOOST_STATIC_ASSERT((::boost::has_move_emulation_enabled::value == true)); + //BOOST_CONTAINER_STATIC_ASSERT((::boost::has_move_emulation_enabled::value == true)); if(!chain.empty()) this->node_alloc().deallocate_individual(chain); } diff --git a/include/boost/container/detail/pair.hpp b/include/boost/container/detail/pair.hpp index 56b2fb8..58e5608 100644 --- a/include/boost/container/detail/pair.hpp +++ b/include/boost/container/detail/pair.hpp @@ -25,7 +25,6 @@ #include #include -#include #include #include #include @@ -166,35 +165,35 @@ struct pair pair() : first(), second() { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } //pair copy assignment pair(const pair& x) : first(x.first), second(x.second) { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } //pair move constructor pair(BOOST_RV_REF(pair) p) : first(::boost::move(BOOST_MOVE_TO_LV(p).first)), second(::boost::move(BOOST_MOVE_TO_LV(p).second)) { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } template pair(const pair &p) : first(p.first), second(p.second) { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } template pair(BOOST_RV_REF_BEG pair BOOST_RV_REF_END p) : first(::boost::move(BOOST_MOVE_TO_LV(p).first)), second(::boost::move(BOOST_MOVE_TO_LV(p).second)) { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } //pair from two values @@ -202,7 +201,7 @@ struct pair : first(t1) , second(t2) { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } template @@ -210,34 +209,34 @@ struct pair : first(::boost::forward(u)) , second(::boost::forward(v)) { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } //And now compatibility with std::pair pair(const std::pair& x) : first(x.first), second(x.second) { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } template pair(const std::pair& p) : first(p.first), second(p.second) { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } pair(BOOST_RV_REF_BEG std::pair BOOST_RV_REF_END p) : first(::boost::move(BOOST_MOVE_TO_LV(p).first)), second(::boost::move(BOOST_MOVE_TO_LV(p).second)) { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } template pair(BOOST_RV_REF_BEG std::pair BOOST_RV_REF_END p) : first(::boost::move(BOOST_MOVE_TO_LV(p).first)), second(::boost::move(BOOST_MOVE_TO_LV(p).second)) { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) @@ -245,7 +244,7 @@ struct pair pair(try_emplace_t, BOOST_FWD_REF(KeyType) k, Args && ...args) : first(boost::forward(k)), second(::boost::forward(args)...)\ { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } #else @@ -255,7 +254,7 @@ struct pair pair( try_emplace_t, BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N )\ : first(boost::forward(k)), second(BOOST_MOVE_FWD##N)\ {\ - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair)));\ + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair)));\ }\ // BOOST_MOVE_ITERATE_0TO9(BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE) @@ -277,7 +276,7 @@ struct pair )\ : first(BOOST_MOVE_TMPL_GET##N), second(BOOST_MOVE_TMPL_GETQ##M)\ { (void)p; (void)q;\ - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair)));\ + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair)));\ }\ // BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE) @@ -299,7 +298,7 @@ struct pair pair(piecewise_construct_t, Tuple t1, Tuple t2) : pair(t1, t2, typename build_number_seq::type(), typename build_number_seq::type()) { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } # else //piecewise construction from variadic tuple (suboptimal, without delegating constructors) @@ -319,7 +318,7 @@ struct pair : first (build_from_args (::boost::move(t1))) , second (build_from_args(::boost::move(t2))) { - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair))); } # endif //BOOST_NO_CXX11_VARIADIC_TEMPLATES #elif defined(BOOST_MSVC) && (_CPPLIB_VER == 520) @@ -332,7 +331,7 @@ struct pair , StdTuple q)\ : first(BOOST_MOVE_GET_IDX##N), second(BOOST_MOVE_GET_IDXQ##M)\ { (void)p; (void)q;\ - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair)));\ + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair)));\ }\ // BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE) @@ -353,7 +352,7 @@ struct pair , StdTuple q)\ : first(BOOST_MOVE_GET_IDX##N), second(BOOST_MOVE_GET_IDXQ##M)\ { (void)p; (void)q;\ - BOOST_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair)));\ + BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair) == sizeof(pair)));\ }\ // BOOST_MOVE_ITER2D_0TOMAX(BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT, BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE) diff --git a/include/boost/container/detail/workaround.hpp b/include/boost/container/detail/workaround.hpp index 77cf463..23342bb 100644 --- a/include/boost/container/detail/workaround.hpp +++ b/include/boost/container/detail/workaround.hpp @@ -190,4 +190,44 @@ BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore(T1 const&) # define BOOST_CONTAINER_CATCH_END } #endif +#ifndef BOOST_NO_CXX11_STATIC_ASSERT +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_CONTAINER_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__) +# else +# define BOOST_CONTAINER_STATIC_ASSERT( B ) static_assert(B, #B) +# endif +#else +namespace boost { + namespace container { + namespace dtl { + + template + struct STATIC_ASSERTION_FAILURE; + + template<> + struct STATIC_ASSERTION_FAILURE {}; + + template struct static_assert_test {}; + + } + } +} + +#define BOOST_CONTAINER_STATIC_ASSERT(B) \ + typedef ::boost::container::dtl::static_assert_test<\ + (unsigned)sizeof(::boost::container::dtl::STATIC_ASSERTION_FAILURE)>\ + BOOST_JOIN(boost_container_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED + +#endif + +#ifndef BOOST_NO_CXX11_STATIC_ASSERT +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_CONTAINER_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__) +# else +# define BOOST_CONTAINER_STATIC_ASSERT_MSG( B, Msg ) static_assert( B, Msg ) +# endif +#else +# define BOOST_CONTAINER_STATIC_ASSERT_MSG( B, Msg ) BOOST_CONTAINER_STATIC_ASSERT( B ) +#endif + #endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP diff --git a/include/boost/container/flat_map.hpp b/include/boost/container/flat_map.hpp index f84ecf2..b092fb2 100644 --- a/include/boost/container/flat_map.hpp +++ b/include/boost/container/flat_map.hpp @@ -198,7 +198,7 @@ class flat_map typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type; //AllocatorOrContainer::value_type must be std::pair - BOOST_STATIC_ASSERT((dtl::is_same, value_type>::value)); + BOOST_CONTAINER_STATIC_ASSERT((dtl::is_same, value_type>::value)); ////////////////////////////////////////////// // @@ -1851,7 +1851,7 @@ class flat_multimap typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type; //AllocatorOrContainer::value_type must be std::pair - BOOST_STATIC_ASSERT((dtl::is_same, value_type>::value)); + BOOST_CONTAINER_STATIC_ASSERT((dtl::is_same, value_type>::value)); ////////////////////////////////////////////// // diff --git a/include/boost/container/map.hpp b/include/boost/container/map.hpp index 2db85ec..80f04aa 100644 --- a/include/boost/container/map.hpp +++ b/include/boost/container/map.hpp @@ -44,8 +44,6 @@ // intrusive/detail #include //pair #include //less, equal -// other -#include // std #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #include @@ -130,7 +128,7 @@ class map (insert_return_type_base) insert_return_type; //allocator_type::value_type type must be std::pair - BOOST_STATIC_ASSERT((dtl::is_same >::value)); + BOOST_CONTAINER_STATIC_ASSERT((dtl::is_same >::value)); ////////////////////////////////////////////// // @@ -1460,7 +1458,7 @@ class multimap >) node_type; //allocator_type::value_type type must be std::pair - BOOST_STATIC_ASSERT((dtl::is_same >::value)); + BOOST_CONTAINER_STATIC_ASSERT((dtl::is_same >::value)); ////////////////////////////////////////////// // diff --git a/include/boost/container/node_allocator.hpp b/include/boost/container/node_allocator.hpp index 5f22cf2..d6076f4 100644 --- a/include/boost/container/node_allocator.hpp +++ b/include/boost/container/node_allocator.hpp @@ -30,7 +30,6 @@ #include #include -#include #include namespace boost { @@ -65,7 +64,7 @@ class node_allocator static const std::size_t nodes_per_block = NodesPerBlock; - BOOST_STATIC_ASSERT((Version <=2)); + BOOST_CONTAINER_STATIC_ASSERT((Version <=2)); #endif public: @@ -189,7 +188,7 @@ class node_allocator pointer allocation_command (allocation_type command, size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse) { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); pointer ret = this->priv_allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); if(BOOST_UNLIKELY(!ret && !(command & BOOST_CONTAINER_NOTHROW_ALLOCATION))) boost::container::throw_bad_alloc(); @@ -200,7 +199,7 @@ class node_allocator //!pointed by p can hold. size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); return dlmalloc_size(p); } @@ -209,7 +208,7 @@ class node_allocator //!Throws bad_alloc if there is no enough memory pointer allocate_one() { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); typedef dtl::shared_node_pool shared_pool_t; typedef dtl::singleton_default singleton_t; @@ -220,7 +219,7 @@ class node_allocator //!Elements must be individually deallocated with deallocate_one() void allocate_individual(std::size_t num_elements, multiallocation_chain &chain) { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); typedef dtl::shared_node_pool shared_pool_t; typedef dtl::singleton_default singleton_t; @@ -234,7 +233,7 @@ class node_allocator //!with other functions different from allocate_one(). Never throws void deallocate_one(pointer p) BOOST_NOEXCEPT_OR_NOTHROW { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); typedef dtl::shared_node_pool shared_pool_t; typedef dtl::singleton_default singleton_t; @@ -243,7 +242,7 @@ class node_allocator void deallocate_individual(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); typedef dtl::shared_node_pool shared_pool_t; typedef dtl::singleton_default singleton_t; @@ -255,7 +254,7 @@ class node_allocator //!Elements must be individually deallocated with deallocate() void allocate_many(size_type elem_size, std::size_t n_elements, multiallocation_chain &chain) { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); dlmalloc_memchain ch; BOOST_CONTAINER_MEMCHAIN_INIT(&ch); if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){ @@ -271,7 +270,7 @@ class node_allocator //!Elements must be individually deallocated with deallocate() void allocate_many(const size_type *elem_sizes, size_type n_elements, multiallocation_chain &chain) { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); dlmalloc_memchain ch; dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), BOOST_CONTAINER_DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch); if(BOOST_UNLIKELY(BOOST_CONTAINER_MEMCHAIN_EMPTY(&ch))){ @@ -285,7 +284,7 @@ class node_allocator void deallocate_many(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW { - BOOST_STATIC_ASSERT(( Version > 1 )); + BOOST_CONTAINER_STATIC_ASSERT(( Version > 1 )); void *first = &*chain.begin(); void *last = &*chain.last(); size_t num = chain.size(); diff --git a/include/boost/container/node_handle.hpp b/include/boost/container/node_handle.hpp index 18ec61f..41bea97 100644 --- a/include/boost/container/node_handle.hpp +++ b/include/boost/container/node_handle.hpp @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -258,7 +257,7 @@ class node_handle //! Throws: Nothing. value_type& value() const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT((dtl::is_same::value)); + BOOST_CONTAINER_STATIC_ASSERT((dtl::is_same::value)); BOOST_ASSERT(!empty()); return m_ptr->get_data(); } @@ -273,7 +272,7 @@ class node_handle //! Requires: Modifying the key through the returned reference is permitted. key_type& key() const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT((!dtl::is_same::value)); + BOOST_CONTAINER_STATIC_ASSERT((!dtl::is_same::value)); BOOST_ASSERT(!empty()); return const_cast(KeyMapped().key_of_value(m_ptr->get_data())); } @@ -286,7 +285,7 @@ class node_handle //! Throws: Nothing. mapped_type& mapped() const BOOST_NOEXCEPT { - BOOST_STATIC_ASSERT((!dtl::is_same::value)); + BOOST_CONTAINER_STATIC_ASSERT((!dtl::is_same::value)); BOOST_ASSERT(!empty()); return KeyMapped().mapped_of_value(m_ptr->get_data()); } diff --git a/include/boost/container/options.hpp b/include/boost/container/options.hpp index c58ff82..48edd38 100644 --- a/include/boost/container/options.hpp +++ b/include/boost/container/options.hpp @@ -23,8 +23,8 @@ #include #include +#include #include -#include namespace boost { namespace container { @@ -608,7 +608,7 @@ struct deque_opt { static const std::size_t block_bytes = BlockBytes; static const std::size_t block_size = BlockSize; - BOOST_STATIC_ASSERT_MSG(!(block_bytes && block_size), "block_bytes and block_size can't be specified at the same time"); + BOOST_CONTAINER_STATIC_ASSERT_MSG(!(block_bytes && block_size), "block_bytes and block_size can't be specified at the same time"); }; typedef deque_opt<0u, 0u> deque_null_opt; diff --git a/include/boost/container/pmr/resource_adaptor.hpp b/include/boost/container/pmr/resource_adaptor.hpp index 3a72786..78f1bd3 100644 --- a/include/boost/container/pmr/resource_adaptor.hpp +++ b/include/boost/container/pmr/resource_adaptor.hpp @@ -87,7 +87,7 @@ class resource_adaptor_imp void static_assert_if_not_char_allocator() const { //This class can only be used with allocators type char - BOOST_STATIC_ASSERT((boost::container::dtl::is_same::value)); + BOOST_CONTAINER_STATIC_ASSERT((boost::container::dtl::is_same::value)); } #endif diff --git a/include/boost/container/static_vector.hpp b/include/boost/container/static_vector.hpp index b3d3b4f..88bf2ba 100644 --- a/include/boost/container/static_vector.hpp +++ b/include/boost/container/static_vector.hpp @@ -87,7 +87,7 @@ class static_storage_allocator { return true; } private: - BOOST_STATIC_ASSERT_MSG(!InplaceAlignment || (InplaceAlignment & (InplaceAlignment-1)) == 0, "Alignment option must be zero or power of two"); + BOOST_CONTAINER_STATIC_ASSERT_MSG(!InplaceAlignment || (InplaceAlignment & (InplaceAlignment-1)) == 0, "Alignment option must be zero or power of two"); static const std::size_t final_alignment = InplaceAlignment ? InplaceAlignment : dtl::alignment_of::value; typename dtl::aligned_storage::type storage; }; diff --git a/include/boost/container/string.hpp b/include/boost/container/string.hpp index fc332d3..28b4bb5 100644 --- a/include/boost/container/string.hpp +++ b/include/boost/container/string.hpp @@ -49,8 +49,6 @@ #include #include -#include - #include #include // #include @@ -275,7 +273,7 @@ class basic_string_base //Access and copy (to avoid UB) the first byte of the union to know if the //active representation is short or long short_header hdr; - BOOST_STATIC_ASSERT((sizeof(short_header) == 1)); + BOOST_CONTAINER_STATIC_ASSERT((sizeof(short_header) == 1)); *(unsigned char*)&hdr = *(unsigned char*)&this->members_.m_repr; return hdr.is_short != 0; } diff --git a/include/boost/container/vector.hpp b/include/boost/container/vector.hpp index f8d96e2..503a80b 100644 --- a/include/boost/container/vector.hpp +++ b/include/boost/container/vector.hpp @@ -822,7 +822,7 @@ private: typedef value_less value_less_t; //If provided the stored_size option must specify a type that is equal or a type that is smaller. - BOOST_STATIC_ASSERT( (sizeof(stored_size_type) < sizeof(alloc_size_type) || + BOOST_CONTAINER_STATIC_ASSERT( (sizeof(stored_size_type) < sizeof(alloc_size_type) || dtl::is_same::value) ); typedef typename dtl::version::type alloc_version; @@ -1094,7 +1094,7 @@ private: //! Complexity: Constant. vector(BOOST_RV_REF(vector) x) BOOST_NOEXCEPT_OR_NOTHROW : m_holder(boost::move(x.m_holder)) - { BOOST_STATIC_ASSERT((!allocator_traits_type::is_partially_propagable::value)); } + { BOOST_CONTAINER_STATIC_ASSERT((!allocator_traits_type::is_partially_propagable::value)); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) //! Effects: Constructs a vector that will use a copy of allocator a diff --git a/src/pool_resource.cpp b/src/pool_resource.cpp index 631c9d8..512f414 100644 --- a/src/pool_resource.cpp +++ b/src/pool_resource.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include @@ -96,10 +95,10 @@ class pool_data_t //pool_resource //Detect overflow in ceil_pow2 -BOOST_STATIC_ASSERT(pool_options_default_max_blocks_per_chunk <= (std::size_t(-1)/2u+1u)); +BOOST_CONTAINER_STATIC_ASSERT(pool_options_default_max_blocks_per_chunk <= (std::size_t(-1)/2u+1u)); //Sanity checks -BOOST_STATIC_ASSERT(bi::detail::static_is_pow2::value); -BOOST_STATIC_ASSERT(bi::detail::static_is_pow2::value); +BOOST_CONTAINER_STATIC_ASSERT(bi::detail::static_is_pow2::value); +BOOST_CONTAINER_STATIC_ASSERT(bi::detail::static_is_pow2::value); //unsynchronized_pool_resource diff --git a/test/allocator_traits_test.cpp b/test/allocator_traits_test.cpp index eb42e56..494b894 100644 --- a/test/allocator_traits_test.cpp +++ b/test/allocator_traits_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include #include -#include #include #include #include @@ -250,66 +249,66 @@ int main() test_void_allocator(); //SimpleAllocator - BOOST_STATIC_ASSERT(( is_same >::value_type, int>::value )); - BOOST_STATIC_ASSERT(( is_same >::pointer, int*>::value )); - BOOST_STATIC_ASSERT(( is_same >::const_pointer, const int*>::value )); - BOOST_STATIC_ASSERT(( is_same >::void_pointer, void*>::value )); - BOOST_STATIC_ASSERT(( is_same >::const_void_pointer, const void*>::value )); - BOOST_STATIC_ASSERT(( is_same >::difference_type, std::ptrdiff_t>::value )); - BOOST_STATIC_ASSERT(( is_same >::size_type, std::size_t>::value )); - BOOST_STATIC_ASSERT(( boost::container::allocator_traits + BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits < SimpleAllocator >::propagate_on_container_copy_assignment::value == false )); - BOOST_STATIC_ASSERT(( boost::container::allocator_traits + BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits < SimpleAllocator >::propagate_on_container_move_assignment::value == false )); - BOOST_STATIC_ASSERT(( boost::container::allocator_traits + BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits < SimpleAllocator >::propagate_on_container_swap::value == false )); - BOOST_STATIC_ASSERT(( boost::container::allocator_traits + BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits < SimpleAllocator >::is_always_equal::value == true )); - BOOST_STATIC_ASSERT(( boost::container::allocator_traits + BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits < SimpleAllocator >::is_partially_propagable::value == false )); - BOOST_STATIC_ASSERT(( is_same >::rebind_traits::allocator_type , SimpleAllocator >::value )); - BOOST_STATIC_ASSERT(( is_same >::rebind_alloc::value_type , double >::value )); //ComplexAllocator - BOOST_STATIC_ASSERT(( is_same >::value_type, int>::value )); - BOOST_STATIC_ASSERT(( is_same >::pointer, SimpleSmartPtr >::value )); - BOOST_STATIC_ASSERT(( is_same >::const_pointer, SimpleSmartPtr >::value )); - BOOST_STATIC_ASSERT(( is_same >::void_pointer, SimpleSmartPtr >::value )); - BOOST_STATIC_ASSERT(( is_same >::const_void_pointer, SimpleSmartPtr >::value )); - BOOST_STATIC_ASSERT(( is_same >::difference_type, signed short>::value )); - BOOST_STATIC_ASSERT(( is_same >::size_type, unsigned short>::value )); - BOOST_STATIC_ASSERT(( boost::container::allocator_traits + BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits < ComplexAllocator >::propagate_on_container_copy_assignment::value == true )); - BOOST_STATIC_ASSERT(( boost::container::allocator_traits + BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits < ComplexAllocator >::propagate_on_container_move_assignment::value == true )); - BOOST_STATIC_ASSERT(( boost::container::allocator_traits + BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits < ComplexAllocator >::propagate_on_container_swap::value == true )); - BOOST_STATIC_ASSERT(( boost::container::allocator_traits + BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits < ComplexAllocator >::is_always_equal::value == false )); - BOOST_STATIC_ASSERT(( boost::container::allocator_traits + BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits < ComplexAllocator >::is_partially_propagable::value == true )); - BOOST_STATIC_ASSERT(( is_same >::rebind_traits::allocator_type , ComplexAllocator >::value )); - BOOST_STATIC_ASSERT(( is_same >::rebind_alloc::value_type , double >::value )); diff --git a/test/deque_test.cpp b/test/deque_test.cpp index 907bee5..e928d7f 100644 --- a/test/deque_test.cpp +++ b/test/deque_test.cpp @@ -421,7 +421,7 @@ int main () typedef boost::container::deque cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move::value != + BOOST_CONTAINER_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(std::allocator) test failed"); @@ -431,7 +431,7 @@ int main () typedef boost::container::deque > cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move::value != + BOOST_CONTAINER_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(std::allocator) test failed"); diff --git a/test/devector_options_test.cpp b/test/devector_options_test.cpp index c9eba7f..ae333c3 100644 --- a/test/devector_options_test.cpp +++ b/test/devector_options_test.cpp @@ -56,7 +56,7 @@ void test_stored_size_type() //Test size reduction { typedef devector devector_t; - BOOST_STATIC_ASSERT( sizeof(Unsigned) >= sizeof(std::size_t) || + BOOST_CONTAINER_STATIC_ASSERT( sizeof(Unsigned) >= sizeof(std::size_t) || sizeof(devector_t) < sizeof(devector) ); } diff --git a/test/devector_test.cpp b/test/devector_test.cpp index 97f0bff..ed1581e 100644 --- a/test/devector_test.cpp +++ b/test/devector_test.cpp @@ -24,7 +24,6 @@ #include "propagate_allocator_test.hpp" #include "check_equal_containers.hpp" #include "movable_int.hpp" -#include #include @@ -4045,7 +4044,7 @@ int main() typedef boost::container::devector cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move::value != + BOOST_CONTAINER_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(std::allocator) test failed"); @@ -4055,7 +4054,7 @@ int main() typedef boost::container::devector > cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move::value != + BOOST_CONTAINER_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(std::allocator) test failed"); diff --git a/test/flat_map_adaptor_test.cpp b/test/flat_map_adaptor_test.cpp index 2ffa02d..c03c5d5 100644 --- a/test/flat_map_adaptor_test.cpp +++ b/test/flat_map_adaptor_test.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include @@ -117,12 +116,12 @@ int main() typedef flat_map, small_vector, 10> > map_container_t; typedef flat_multimap, small_vector, 10> > multimap_container_t; #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same >::value )); - BOOST_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); #endif - BOOST_STATIC_ASSERT(( is_same::type >::value )); - BOOST_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); } return 0; diff --git a/test/flat_map_test.cpp b/test/flat_map_test.cpp index 2dd17a1..7908d85 100644 --- a/test/flat_map_test.cpp +++ b/test/flat_map_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include #include #include @@ -463,8 +462,8 @@ struct get_real_stored_allocator > bool test_heterogeneous_lookups() { - BOOST_STATIC_ASSERT((dtl::is_transparent::value)); - BOOST_STATIC_ASSERT(!(dtl::is_transparent >::value)); + BOOST_CONTAINER_STATIC_ASSERT((dtl::is_transparent::value)); + BOOST_CONTAINER_STATIC_ASSERT(!(dtl::is_transparent >::value)); typedef flat_map map_t; typedef flat_multimap mmap_t; typedef map_t::value_type value_type; @@ -776,7 +775,7 @@ int main() typedef boost::container::new_allocator alloc_or_cont_t; typedef boost::container::flat_map cont; typedef boost::container::dtl::flat_tree, alloc_or_cont_t> tree; - BOOST_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value , "has_trivial_destructor_after_move(flat_map, default) test failed"); } @@ -785,7 +784,7 @@ int main() typedef boost::container::vector alloc_or_cont_t; typedef boost::container::flat_map, alloc_or_cont_t> cont; typedef boost::container::dtl::flat_tree, alloc_or_cont_t> tree; - BOOST_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value , "has_trivial_destructor_after_move(flat_map, vector) test failed"); } @@ -794,7 +793,7 @@ int main() typedef std::vector alloc_or_cont_t; typedef boost::container::flat_map, alloc_or_cont_t> cont; typedef boost::container::dtl::flat_tree, alloc_or_cont_t> tree; - BOOST_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value , "has_trivial_destructor_after_move(flat_map, std::vector) test failed"); } @@ -803,7 +802,7 @@ int main() typedef boost::container::new_allocator alloc_or_cont_t; typedef boost::container::flat_multimap cont; typedef boost::container::dtl::flat_tree, alloc_or_cont_t> tree; - BOOST_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value , "has_trivial_destructor_after_move(flat_multimap, default) test failed"); } @@ -812,7 +811,7 @@ int main() typedef boost::container::vector alloc_or_cont_t; typedef boost::container::flat_multimap, alloc_or_cont_t> cont; typedef boost::container::dtl::flat_tree, alloc_or_cont_t> tree; - BOOST_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value , "has_trivial_destructor_after_move(flat_multimap, vector) test failed"); } @@ -821,7 +820,7 @@ int main() typedef std::vector alloc_or_cont_t; typedef boost::container::flat_multimap, alloc_or_cont_t> cont; typedef boost::container::dtl::flat_tree, alloc_or_cont_t> tree; - BOOST_STATIC_ASSERT_MSG (boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG (boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value , "has_trivial_destructor_after_move(flat_multimap, std::vector) test failed"); } diff --git a/test/flat_set_adaptor_test.cpp b/test/flat_set_adaptor_test.cpp index cd5ef19..21934ed 100644 --- a/test/flat_set_adaptor_test.cpp +++ b/test/flat_set_adaptor_test.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include @@ -113,11 +112,11 @@ int main() typedef flat_set, small_vector > set_container_t; typedef flat_multiset, small_vector > multiset_container_t; #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same >::value )); - BOOST_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); #endif - BOOST_STATIC_ASSERT(( is_same::type >::value )); - BOOST_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); } return 0; diff --git a/test/flat_set_test.cpp b/test/flat_set_test.cpp index 00dfe07..36612c9 100644 --- a/test/flat_set_test.cpp +++ b/test/flat_set_test.cpp @@ -870,7 +870,7 @@ int main() { typedef boost::container::flat_set cont; typedef boost::container::dtl::flat_tree, void> tree; - BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value , "has_trivial_destructor_after_move(flat_set, default) test failed"); } @@ -879,7 +879,7 @@ int main() typedef boost::container::vector alloc_or_cont_t; typedef boost::container::flat_set, alloc_or_cont_t> cont; typedef boost::container::dtl::flat_tree, alloc_or_cont_t> tree; - BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value , "has_trivial_destructor_after_move(flat_set, vector) test failed"); } @@ -888,7 +888,7 @@ int main() typedef std::vector alloc_or_cont_t; typedef boost::container::flat_set, alloc_or_cont_t> cont; typedef boost::container::dtl::flat_tree, alloc_or_cont_t> tree; - BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value , "has_trivial_destructor_after_move(flat_set, std::vector) test failed"); } @@ -896,7 +896,7 @@ int main() { typedef boost::container::flat_multiset cont; typedef boost::container::dtl::flat_tree, void> tree; - BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value , "has_trivial_destructor_after_move(flat_multiset, default) test failed"); } @@ -905,7 +905,7 @@ int main() typedef boost::container::vector alloc_or_cont_t; typedef boost::container::flat_multiset, alloc_or_cont_t> cont; typedef boost::container::dtl::flat_tree, alloc_or_cont_t> tree; - BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value , "has_trivial_destructor_after_move(flat_multiset, vector) test failed"); } @@ -914,7 +914,7 @@ int main() typedef std::vector alloc_or_cont_t; typedef boost::container::flat_multiset, alloc_or_cont_t> cont; typedef boost::container::dtl::flat_tree, alloc_or_cont_t> tree; - BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value , "has_trivial_destructor_after_move(flat_multiset, std::vector) test failed"); } diff --git a/test/flat_tree_test.cpp b/test/flat_tree_test.cpp index e0cbf75..67f2558 100644 --- a/test/flat_tree_test.cpp +++ b/test/flat_tree_test.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include @@ -133,7 +132,7 @@ int main () std::less, void> tree; typedef tree::container_type container_type; typedef tree::key_compare key_compare; - BOOST_STATIC_ASSERT_MSG ((boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG ((boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(default allocator) test failed"); @@ -144,7 +143,7 @@ int main () std::less, std::allocator > tree; typedef tree::container_type container_type; typedef tree::key_compare key_compare; - BOOST_STATIC_ASSERT_MSG( (boost::has_trivial_destructor_after_move::value == + BOOST_CONTAINER_STATIC_ASSERT_MSG( (boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(std::allocator) test failed"); diff --git a/test/list_test.cpp b/test/list_test.cpp index c4ec219..c371df8 100644 --- a/test/list_test.cpp +++ b/test/list_test.cpp @@ -263,7 +263,7 @@ int main () typedef boost::container::list cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) @@ -274,7 +274,7 @@ int main () typedef boost::container::list > cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) diff --git a/test/map_test.cpp b/test/map_test.cpp index 67f893c..9d3a145 100644 --- a/test/map_test.cpp +++ b/test/map_test.cpp @@ -643,8 +643,8 @@ int main () typedef multimap< int*, int*, std::less, std::allocator< std::pair > , tree_assoc_options< optimize_size, tree_type >::type > avlmmap_size_optimized_no; - BOOST_STATIC_ASSERT(sizeof(rbmmap_size_optimized_yes) < sizeof(rbmap_size_optimized_no)); - BOOST_STATIC_ASSERT(sizeof(avlmap_size_optimized_yes) < sizeof(avlmmap_size_optimized_no)); + BOOST_CONTAINER_STATIC_ASSERT(sizeof(rbmmap_size_optimized_yes) < sizeof(rbmap_size_optimized_no)); + BOOST_CONTAINER_STATIC_ASSERT(sizeof(avlmap_size_optimized_yes) < sizeof(avlmmap_size_optimized_no)); //////////////////////////////////// // has_trivial_destructor_after_move testing @@ -658,7 +658,7 @@ int main () { typedef boost::container::map cont; typedef boost::container::dtl::tree, void, void> tree; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(map, default allocator) test failed"); @@ -667,7 +667,7 @@ int main () { typedef boost::container::map, std::allocator > cont; typedef boost::container::dtl::tree, std::allocator, void> tree; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(map, std::allocator) test failed"); @@ -680,7 +680,7 @@ int main () // default allocator typedef boost::container::multimap cont; typedef boost::container::dtl::tree, void, void> tree; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(multimap, default allocator) test failed"); @@ -689,7 +689,7 @@ int main () { typedef boost::container::multimap, std::allocator > cont; typedef boost::container::dtl::tree, std::allocator, void> tree; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(multimap, std::allocator) test failed"); diff --git a/test/node_handle_test.cpp b/test/node_handle_test.cpp index 6aab38e..8590c9b 100644 --- a/test/node_handle_test.cpp +++ b/test/node_handle_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// #include -#include #include #include #include @@ -177,16 +176,16 @@ typedef allocator_traits::portable_rebind_alloc::type v void test_types() { //set - BOOST_STATIC_ASSERT(( dtl::is_same::value )); - BOOST_STATIC_ASSERT(( dtl::is_same::value )); - BOOST_STATIC_ASSERT(( dtl::is_same::value )); - BOOST_STATIC_ASSERT(( dtl::is_same::value )); + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same::value )); + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same::value )); + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same::value )); + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same::value )); //map - BOOST_STATIC_ASSERT(( dtl::is_same::value )); - BOOST_STATIC_ASSERT(( dtl::is_same::value )); - BOOST_STATIC_ASSERT(( dtl::is_same::value )); - BOOST_STATIC_ASSERT(( dtl::is_same::value )); + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same::value )); + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same::value )); + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same::value )); + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same::value )); } void test_default_constructor() diff --git a/test/null_iterators_test.cpp b/test/null_iterators_test.cpp index 525d11d..e905a08 100644 --- a/test/null_iterators_test.cpp +++ b/test/null_iterators_test.cpp @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -37,14 +36,14 @@ static buffer_t buffer_0xFF; template const Iterator &on_0x00_buffer() { - BOOST_STATIC_ASSERT(sizeof(buffer_t) >= sizeof(Iterator)); + BOOST_CONTAINER_STATIC_ASSERT(sizeof(buffer_t) >= sizeof(Iterator)); return * ::new(std::memset(&buffer_0x00, 0x00, sizeof(buffer_0x00))) Iterator(); } template const Iterator &on_0xFF_buffer() { - BOOST_STATIC_ASSERT(sizeof(buffer_t) >= sizeof(Iterator)); + BOOST_CONTAINER_STATIC_ASSERT(sizeof(buffer_t) >= sizeof(Iterator)); return * ::new(std::memset(&buffer_0xFF, 0xFF, sizeof(buffer_0xFF))) Iterator(); } diff --git a/test/pmr_deque_test.cpp b/test/pmr_deque_test.cpp index 15c67e2..beef509 100644 --- a/test/pmr_deque_test.cpp +++ b/test/pmr_deque_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include int main() @@ -18,9 +17,9 @@ int main() using boost::container::dtl::is_same; typedef deque > intcontainer_t; - BOOST_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); #endif return 0; } diff --git a/test/pmr_devector_test.cpp b/test/pmr_devector_test.cpp index b7001d0..592fba6 100644 --- a/test/pmr_devector_test.cpp +++ b/test/pmr_devector_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include int main() @@ -18,9 +17,9 @@ int main() using boost::container::dtl::is_same; typedef devector > intcontainer_t; - BOOST_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); #endif return 0; } diff --git a/test/pmr_flat_map_test.cpp b/test/pmr_flat_map_test.cpp index f98e497..c9230e1 100644 --- a/test/pmr_flat_map_test.cpp +++ b/test/pmr_flat_map_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include int main() @@ -18,9 +17,9 @@ int main() using boost::container::dtl::is_same; typedef flat_map, pmr::polymorphic_allocator > > intcontainer_t; - BOOST_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); #endif return 0; } diff --git a/test/pmr_flat_set_test.cpp b/test/pmr_flat_set_test.cpp index 5c9efe1..8d430e8 100644 --- a/test/pmr_flat_set_test.cpp +++ b/test/pmr_flat_set_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include int main() @@ -18,9 +17,9 @@ int main() using boost::container::dtl::is_same; typedef flat_set, pmr::polymorphic_allocator > intcontainer_t; - BOOST_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); #endif return 0; } diff --git a/test/pmr_list_test.cpp b/test/pmr_list_test.cpp index 794ccf5..365cfb1 100644 --- a/test/pmr_list_test.cpp +++ b/test/pmr_list_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include int main() @@ -18,9 +17,9 @@ int main() using boost::container::dtl::is_same; typedef list > intcontainer_t; - BOOST_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); #endif return 0; } diff --git a/test/pmr_map_test.cpp b/test/pmr_map_test.cpp index 5db3f10..1b954a4 100644 --- a/test/pmr_map_test.cpp +++ b/test/pmr_map_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include int main() @@ -18,9 +17,9 @@ int main() using boost::container::dtl::is_same; typedef map, pmr::polymorphic_allocator > > intcontainer_t; - BOOST_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); #endif return 0; } diff --git a/test/pmr_set_test.cpp b/test/pmr_set_test.cpp index 3093fd4..3f10b15 100644 --- a/test/pmr_set_test.cpp +++ b/test/pmr_set_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include int main() @@ -18,9 +17,9 @@ int main() using boost::container::dtl::is_same; typedef set, pmr::polymorphic_allocator > intcontainer_t; - BOOST_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); #endif return 0; } diff --git a/test/pmr_small_vector_test.cpp b/test/pmr_small_vector_test.cpp index 334588d..adc65a0 100644 --- a/test/pmr_small_vector_test.cpp +++ b/test/pmr_small_vector_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include int main() @@ -18,9 +17,9 @@ int main() using boost::container::dtl::is_same; typedef small_vector > intcontainer_t; - BOOST_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); #endif return 0; } diff --git a/test/pmr_stable_vector_test.cpp b/test/pmr_stable_vector_test.cpp index 246f071..44307bc 100644 --- a/test/pmr_stable_vector_test.cpp +++ b/test/pmr_stable_vector_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include int main() @@ -18,9 +17,9 @@ int main() using boost::container::dtl::is_same; typedef stable_vector > intcontainer_t; - BOOST_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); #endif return 0; } diff --git a/test/pmr_string_test.cpp b/test/pmr_string_test.cpp index c8d81a5..9b62c0d 100644 --- a/test/pmr_string_test.cpp +++ b/test/pmr_string_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include int main() @@ -19,13 +18,13 @@ int main() typedef basic_string, pmr::polymorphic_allocator > string_t; typedef basic_string, pmr::polymorphic_allocator > wstring_t; - BOOST_STATIC_ASSERT(( is_same::value )); - BOOST_STATIC_ASSERT(( is_same::type>::value )); - BOOST_STATIC_ASSERT(( is_same::value )); - BOOST_STATIC_ASSERT(( is_same::type>::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type>::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type>::value )); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same::value )); - BOOST_STATIC_ASSERT(( is_same::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::value )); #endif return 0; } diff --git a/test/pmr_vector_test.cpp b/test/pmr_vector_test.cpp index 293291c..6352b6d 100644 --- a/test/pmr_vector_test.cpp +++ b/test/pmr_vector_test.cpp @@ -9,7 +9,6 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include int main() @@ -18,9 +17,9 @@ int main() using boost::container::dtl::is_same; typedef vector > intcontainer_t; - BOOST_STATIC_ASSERT(( is_same::type >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same::type >::value )); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_STATIC_ASSERT(( is_same >::value )); + BOOST_CONTAINER_STATIC_ASSERT(( is_same >::value )); #endif return 0; } diff --git a/test/scoped_allocator_adaptor_test.cpp b/test/scoped_allocator_adaptor_test.cpp index 042820d..61d2212 100644 --- a/test/scoped_allocator_adaptor_test.cpp +++ b/test/scoped_allocator_adaptor_test.cpp @@ -51,7 +51,6 @@ struct mark_on_destructor bool mark_on_destructor::destroyed = false; #include -#include #include #include @@ -97,81 +96,81 @@ int main() , InnerAlloc2 > Rebound9Scoped2Inner; //outer_allocator_type - BOOST_STATIC_ASSERT(( dtl::is_same< OuterAlloc + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< OuterAlloc , Scoped0Inner::outer_allocator_type>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< OuterAlloc + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< OuterAlloc , Scoped1Inner::outer_allocator_type>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< OuterAlloc + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< OuterAlloc , Scoped2Inner::outer_allocator_type>::value )); //value_type - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::value_type + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::value_type , Scoped0Inner::value_type>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::value_type + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::value_type , Scoped1Inner::value_type>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::value_type + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::value_type , Scoped2Inner::value_type>::value )); //size_type - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::size_type + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::size_type , Scoped0Inner::size_type>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::size_type + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::size_type , Scoped1Inner::size_type>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::size_type + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::size_type , Scoped2Inner::size_type>::value )); //difference_type - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::difference_type + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::difference_type , Scoped0Inner::difference_type>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::difference_type + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::difference_type , Scoped1Inner::difference_type>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::difference_type + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::difference_type , Scoped2Inner::difference_type>::value )); //pointer - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::pointer + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::pointer , Scoped0Inner::pointer>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::pointer + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::pointer , Scoped1Inner::pointer>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::pointer + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::pointer , Scoped2Inner::pointer>::value )); //const_pointer - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::const_pointer + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::const_pointer , Scoped0Inner::const_pointer>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::const_pointer + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::const_pointer , Scoped1Inner::const_pointer>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::const_pointer + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::const_pointer , Scoped2Inner::const_pointer>::value )); //void_pointer - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::void_pointer + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::void_pointer , Scoped0Inner::void_pointer>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::void_pointer + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::void_pointer , Scoped1Inner::void_pointer>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::void_pointer + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::void_pointer , Scoped2Inner::void_pointer>::value )); //const_void_pointer - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::const_void_pointer + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::const_void_pointer , Scoped0Inner::const_void_pointer>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::const_void_pointer + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::const_void_pointer , Scoped1Inner::const_void_pointer>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits::const_void_pointer + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits::const_void_pointer , Scoped2Inner::const_void_pointer>::value )); //rebind - BOOST_STATIC_ASSERT(( dtl::is_same >::other + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same >::other , Rebound9Scoped0Inner >::value )); - BOOST_STATIC_ASSERT(( dtl::is_same >::other + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same >::other , Rebound9Scoped1Inner >::value )); - BOOST_STATIC_ASSERT(( dtl::is_same >::other + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same >::other , Rebound9Scoped2Inner >::value )); //inner_allocator_type - BOOST_STATIC_ASSERT(( dtl::is_same< Scoped0Inner + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< Scoped0Inner , Scoped0Inner::inner_allocator_type>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< scoped_allocator_adaptor + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< scoped_allocator_adaptor , Scoped1Inner::inner_allocator_type>::value )); - BOOST_STATIC_ASSERT(( dtl::is_same< scoped_allocator_adaptor + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< scoped_allocator_adaptor , Scoped2Inner::inner_allocator_type>::value )); { @@ -213,78 +212,78 @@ int main() //propagate_on_container_copy_assignment //0 inner - BOOST_STATIC_ASSERT(( !Scoped0InnerF::propagate_on_container_copy_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped0InnerT::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped0InnerF::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped0InnerT::propagate_on_container_copy_assignment::value )); //1 inner - BOOST_STATIC_ASSERT(( !Scoped1InnerFF::propagate_on_container_copy_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped1InnerFT::propagate_on_container_copy_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped1InnerTF::propagate_on_container_copy_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped1InnerTT::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped1InnerFF::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped1InnerFT::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped1InnerTF::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped1InnerTT::propagate_on_container_copy_assignment::value )); //2 inner - BOOST_STATIC_ASSERT(( !Scoped2InnerFFF::propagate_on_container_copy_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerFFT::propagate_on_container_copy_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerFTF::propagate_on_container_copy_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerFTT::propagate_on_container_copy_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTFF::propagate_on_container_copy_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTFT::propagate_on_container_copy_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTTF::propagate_on_container_copy_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTTT::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped2InnerFFF::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerFFT::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerFTF::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerFTT::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTFF::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTFT::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTTF::propagate_on_container_copy_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTTT::propagate_on_container_copy_assignment::value )); //propagate_on_container_move_assignment //0 inner - BOOST_STATIC_ASSERT(( !Scoped0InnerF::propagate_on_container_move_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped0InnerT::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped0InnerF::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped0InnerT::propagate_on_container_move_assignment::value )); //1 inner - BOOST_STATIC_ASSERT(( !Scoped1InnerFF::propagate_on_container_move_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped1InnerFT::propagate_on_container_move_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped1InnerTF::propagate_on_container_move_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped1InnerTT::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped1InnerFF::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped1InnerFT::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped1InnerTF::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped1InnerTT::propagate_on_container_move_assignment::value )); //2 inner - BOOST_STATIC_ASSERT(( !Scoped2InnerFFF::propagate_on_container_move_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerFFT::propagate_on_container_move_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerFTF::propagate_on_container_move_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerFTT::propagate_on_container_move_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTFF::propagate_on_container_move_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTFT::propagate_on_container_move_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTTF::propagate_on_container_move_assignment::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTTT::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped2InnerFFF::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerFFT::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerFTF::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerFTT::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTFF::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTFT::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTTF::propagate_on_container_move_assignment::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTTT::propagate_on_container_move_assignment::value )); //propagate_on_container_swap //0 inner - BOOST_STATIC_ASSERT(( !Scoped0InnerF::propagate_on_container_swap::value )); - BOOST_STATIC_ASSERT(( Scoped0InnerT::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped0InnerF::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped0InnerT::propagate_on_container_swap::value )); //1 inner - BOOST_STATIC_ASSERT(( !Scoped1InnerFF::propagate_on_container_swap::value )); - BOOST_STATIC_ASSERT(( Scoped1InnerFT::propagate_on_container_swap::value )); - BOOST_STATIC_ASSERT(( Scoped1InnerTF::propagate_on_container_swap::value )); - BOOST_STATIC_ASSERT(( Scoped1InnerTT::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped1InnerFF::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped1InnerFT::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped1InnerTF::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped1InnerTT::propagate_on_container_swap::value )); //2 inner - BOOST_STATIC_ASSERT(( !Scoped2InnerFFF::propagate_on_container_swap::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerFFT::propagate_on_container_swap::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerFTF::propagate_on_container_swap::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerFTT::propagate_on_container_swap::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTFF::propagate_on_container_swap::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTFT::propagate_on_container_swap::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTTF::propagate_on_container_swap::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTTT::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped2InnerFFF::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerFFT::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerFTF::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerFTT::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTFF::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTFT::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTTF::propagate_on_container_swap::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTTT::propagate_on_container_swap::value )); //is_always_equal //0 inner - BOOST_STATIC_ASSERT(( !Scoped0InnerF::is_always_equal::value )); - BOOST_STATIC_ASSERT(( Scoped0InnerT::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped0InnerF::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped0InnerT::is_always_equal::value )); //1 inner - BOOST_STATIC_ASSERT(( !Scoped1InnerFF::is_always_equal::value )); - BOOST_STATIC_ASSERT(( !Scoped1InnerFT::is_always_equal::value )); - BOOST_STATIC_ASSERT(( !Scoped1InnerTF::is_always_equal::value )); - BOOST_STATIC_ASSERT(( Scoped1InnerTT::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped1InnerFF::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped1InnerFT::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped1InnerTF::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped1InnerTT::is_always_equal::value )); //2 inner - BOOST_STATIC_ASSERT(( !Scoped2InnerFFF::is_always_equal::value )); - BOOST_STATIC_ASSERT(( !Scoped2InnerFFT::is_always_equal::value )); - BOOST_STATIC_ASSERT(( !Scoped2InnerFTF::is_always_equal::value )); - BOOST_STATIC_ASSERT(( !Scoped2InnerFTT::is_always_equal::value )); - BOOST_STATIC_ASSERT(( !Scoped2InnerTFF::is_always_equal::value )); - BOOST_STATIC_ASSERT(( !Scoped2InnerTFT::is_always_equal::value )); - BOOST_STATIC_ASSERT(( !Scoped2InnerTTF::is_always_equal::value )); - BOOST_STATIC_ASSERT(( Scoped2InnerTTT::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped2InnerFFF::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped2InnerFFT::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped2InnerFTF::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped2InnerFTT::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped2InnerTFF::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped2InnerTFT::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( !Scoped2InnerTTF::is_always_equal::value )); + BOOST_CONTAINER_STATIC_ASSERT(( Scoped2InnerTTT::is_always_equal::value )); } //Default constructor @@ -682,17 +681,17 @@ int main() //////////////////////////////////////////////////////////// { //Check outer_allocator_type is scoped - BOOST_STATIC_ASSERT(( is_scoped_allocator + BOOST_CONTAINER_STATIC_ASSERT(( is_scoped_allocator ::value )); - BOOST_STATIC_ASSERT(( dtl::is_same + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same < outermost_allocator::type , Outer10IdAlloc >::value )); - BOOST_STATIC_ASSERT(( dtl::is_same + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same < ScopedScoped0Inner::outer_allocator_type , scoped_allocator_adaptor >::value )); - BOOST_STATIC_ASSERT(( dtl::is_same + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same < scoped_allocator_adaptor::outer_allocator_type , Outer10IdAlloc >::value )); @@ -765,21 +764,21 @@ int main() //////////////////////////////////////////////////////////// { //Check outer_allocator_type is scoped - BOOST_STATIC_ASSERT(( is_scoped_allocator + BOOST_CONTAINER_STATIC_ASSERT(( is_scoped_allocator ::value )); - BOOST_STATIC_ASSERT(( dtl::is_same + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same < outermost_allocator::type , Outer10IdAlloc >::value )); - BOOST_STATIC_ASSERT(( dtl::is_same + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same < ScopedScoped1Inner::outer_allocator_type , scoped_allocator_adaptor >::value )); - BOOST_STATIC_ASSERT(( dtl::is_same + BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same < scoped_allocator_adaptor::outer_allocator_type , Outer10IdAlloc >::value )); - BOOST_STATIC_ASSERT(( ! + BOOST_CONTAINER_STATIC_ASSERT(( ! uses_allocator < ::allocator_argument_tester , ScopedScoped1Inner::inner_allocator_type::outer_allocator_type diff --git a/test/set_test.cpp b/test/set_test.cpp index 2c7c7ca..3999ace 100644 --- a/test/set_test.cpp +++ b/test/set_test.cpp @@ -590,8 +590,8 @@ int main () typedef multiset< int*, std::less, std::allocator , tree_assoc_options< optimize_size, tree_type >::type > avlmset_size_optimized_no; - BOOST_STATIC_ASSERT(sizeof(rbmset_size_optimized_yes) < sizeof(rbset_size_optimized_no)); - BOOST_STATIC_ASSERT(sizeof(avlset_size_optimized_yes) < sizeof(avlmset_size_optimized_no)); + BOOST_CONTAINER_STATIC_ASSERT(sizeof(rbmset_size_optimized_yes) < sizeof(rbset_size_optimized_no)); + BOOST_CONTAINER_STATIC_ASSERT(sizeof(avlset_size_optimized_yes) < sizeof(avlmset_size_optimized_no)); //////////////////////////////////// // Iterator testing @@ -626,7 +626,7 @@ int main () { typedef boost::container::set cont; typedef boost::container::dtl::tree, void, void> tree; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(set, default allocator) test failed"); @@ -635,7 +635,7 @@ int main () { typedef boost::container::set, std::allocator > cont; typedef boost::container::dtl::tree, std::allocator, void> tree; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(set, std::allocator) test failed"); @@ -644,7 +644,7 @@ int main () { typedef boost::container::multiset cont; typedef boost::container::dtl::tree, void, void> tree; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(multiset, default allocator) test failed"); @@ -653,7 +653,7 @@ int main () { typedef boost::container::multiset, std::allocator > cont; typedef boost::container::dtl::tree, std::allocator, void> tree; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value) , "has_trivial_destructor_after_move(multiset, std::allocator) test failed"); diff --git a/test/slist_test.cpp b/test/slist_test.cpp index 16fd8a0..932c65c 100644 --- a/test/slist_test.cpp +++ b/test/slist_test.cpp @@ -266,7 +266,7 @@ int main () typedef boost::container::slist cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) @@ -277,7 +277,7 @@ int main () typedef boost::container::slist > cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) diff --git a/test/small_vector_options_test.cpp b/test/small_vector_options_test.cpp index 73e4855..dfa486f 100644 --- a/test/small_vector_options_test.cpp +++ b/test/small_vector_options_test.cpp @@ -18,7 +18,7 @@ void test_alignment() { { //extended alignment const std::size_t extended_alignment = sizeof(int)*4u; - BOOST_STATIC_ASSERT(extended_alignment > dtl::alignment_of::value); + BOOST_CONTAINER_STATIC_ASSERT(extended_alignment > dtl::alignment_of::value); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) using options_t = small_vector_options_t< inplace_alignment >; #else diff --git a/test/small_vector_test.cpp b/test/small_vector_test.cpp index 55d737c..8753db0 100644 --- a/test/small_vector_test.cpp +++ b/test/small_vector_test.cpp @@ -40,7 +40,7 @@ bool test_small_vector_base_test() typedef boost::container::small_vector_base smb_t; { typedef boost::container::small_vector sm5_t; - BOOST_STATIC_ASSERT(sm5_t::static_capacity == 5); + BOOST_CONTAINER_STATIC_ASSERT(sm5_t::static_capacity == 5); sm5_t sm5; smb_t &smb = sm5; smb.push_back(1); @@ -51,7 +51,7 @@ bool test_small_vector_base_test() } { typedef boost::container::small_vector sm7_t; - BOOST_STATIC_ASSERT(sm7_t::static_capacity == 7); + BOOST_CONTAINER_STATIC_ASSERT(sm7_t::static_capacity == 7); sm7_t sm7; smb_t &smb = sm7; smb.push_back(2); diff --git a/test/stable_vector_test.cpp b/test/stable_vector_test.cpp index 93b6ce7..adcf259 100644 --- a/test/stable_vector_test.cpp +++ b/test/stable_vector_test.cpp @@ -204,7 +204,7 @@ int main() typedef boost::container::stable_vector cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) @@ -215,7 +215,7 @@ int main() typedef boost::container::stable_vector > cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG( + BOOST_CONTAINER_STATIC_ASSERT_MSG( !(boost::has_trivial_destructor_after_move::value != boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value) diff --git a/test/static_vector_options_test.cpp b/test/static_vector_options_test.cpp index b81c5ae..25b8e82 100644 --- a/test/static_vector_options_test.cpp +++ b/test/static_vector_options_test.cpp @@ -44,7 +44,7 @@ void test_alignment() const std::size_t Capacity = 10u; { //extended alignment const std::size_t extended_alignment = sizeof(int)*4u; - BOOST_STATIC_ASSERT(extended_alignment > dtl::alignment_of::value); + BOOST_CONTAINER_STATIC_ASSERT(extended_alignment > dtl::alignment_of::value); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) using options_t = static_vector_options_t< inplace_alignment >; #else diff --git a/test/static_vector_test.cpp b/test/static_vector_test.cpp index c7c571f..30f6214 100644 --- a/test/static_vector_test.cpp +++ b/test/static_vector_test.cpp @@ -21,7 +21,7 @@ template void test_ctor_ndc() { static_vector s; - BOOST_STATIC_ASSERT((static_vector::static_capacity) == N); + BOOST_CONTAINER_STATIC_ASSERT((static_vector::static_capacity) == N); BOOST_TEST_EQ(s.size() , 0u); BOOST_TEST(s.capacity() == N); BOOST_TEST(s.max_size() == N); @@ -32,7 +32,7 @@ template void test_ctor_nc(size_t n) { static_vector s(n); - BOOST_STATIC_ASSERT((static_vector::static_capacity) == N); + BOOST_CONTAINER_STATIC_ASSERT((static_vector::static_capacity) == N); BOOST_TEST(s.size() == n); BOOST_TEST(s.capacity() == N); BOOST_TEST(s.max_size() == N); @@ -52,7 +52,7 @@ template void test_ctor_nd(size_t n, T const& v) { static_vector s(n, v); - BOOST_STATIC_ASSERT((static_vector::static_capacity) == N); + BOOST_CONTAINER_STATIC_ASSERT((static_vector::static_capacity) == N); BOOST_TEST(s.size() == n); BOOST_TEST(s.capacity() == N); BOOST_TEST_THROWS( (void)s.at(n), out_of_range_t); diff --git a/test/string_test.cpp b/test/string_test.cpp index 8e63f12..056e530 100644 --- a/test/string_test.cpp +++ b/test/string_test.cpp @@ -595,7 +595,7 @@ int main() typedef boost::container::basic_string cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG + BOOST_CONTAINER_STATIC_ASSERT_MSG ( (boost::has_trivial_destructor_after_move::value == (boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value)), @@ -606,7 +606,7 @@ int main() typedef boost::container::basic_string, std::allocator > cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG + BOOST_CONTAINER_STATIC_ASSERT_MSG ( (boost::has_trivial_destructor_after_move::value == (boost::has_trivial_destructor_after_move::value && boost::has_trivial_destructor_after_move::value)), diff --git a/test/uses_allocator_test.cpp b/test/uses_allocator_test.cpp index 16ab4cd..9ef30e9 100644 --- a/test/uses_allocator_test.cpp +++ b/test/uses_allocator_test.cpp @@ -34,49 +34,49 @@ int main() { using namespace boost::container; //Using dummy classes - BOOST_STATIC_ASSERT(( false == uses_allocator + BOOST_CONTAINER_STATIC_ASSERT(( false == uses_allocator < not_uses_allocator, int>::value )); - BOOST_STATIC_ASSERT(( false == uses_allocator + BOOST_CONTAINER_STATIC_ASSERT(( false == uses_allocator < uses_allocator_and_not_convertible_to_int, int>::value )); - BOOST_STATIC_ASSERT(( true == uses_allocator + BOOST_CONTAINER_STATIC_ASSERT(( true == uses_allocator < uses_allocator_and_convertible_to_int, int>::value )); - BOOST_STATIC_ASSERT(( true == uses_allocator + BOOST_CONTAINER_STATIC_ASSERT(( true == uses_allocator < uses_erased_type_allocator, int>::value )); //Using an allocator-like class - BOOST_STATIC_ASSERT(( false == uses_allocator + BOOST_CONTAINER_STATIC_ASSERT(( false == uses_allocator < allocator_argument_tester , propagation_test_allocator >::value )); - BOOST_STATIC_ASSERT(( true == uses_allocator + BOOST_CONTAINER_STATIC_ASSERT(( true == uses_allocator < allocator_argument_tester , propagation_test_allocator >::value )); - BOOST_STATIC_ASSERT(( true == uses_allocator + BOOST_CONTAINER_STATIC_ASSERT(( true == uses_allocator < allocator_argument_tester , propagation_test_allocator >::value )); - BOOST_STATIC_ASSERT(( true == uses_allocator + BOOST_CONTAINER_STATIC_ASSERT(( true == uses_allocator < allocator_argument_tester , propagation_test_allocator >::value )); - BOOST_STATIC_ASSERT(( true == uses_allocator + BOOST_CONTAINER_STATIC_ASSERT(( true == uses_allocator < allocator_argument_tester , propagation_test_allocator >::value )); - BOOST_STATIC_ASSERT(( true == constructible_with_allocator_prefix + BOOST_CONTAINER_STATIC_ASSERT(( true == constructible_with_allocator_prefix < allocator_argument_tester >::value )); - BOOST_STATIC_ASSERT(( true == constructible_with_allocator_suffix + BOOST_CONTAINER_STATIC_ASSERT(( true == constructible_with_allocator_suffix < allocator_argument_tester >::value )); - BOOST_STATIC_ASSERT(( true == constructible_with_allocator_prefix + BOOST_CONTAINER_STATIC_ASSERT(( true == constructible_with_allocator_prefix < allocator_argument_tester >::value )); - BOOST_STATIC_ASSERT(( true == constructible_with_allocator_suffix + BOOST_CONTAINER_STATIC_ASSERT(( true == constructible_with_allocator_suffix < allocator_argument_tester >::value )); return 0; } diff --git a/test/vector_test.cpp b/test/vector_test.cpp index 3a98596..40360d9 100644 --- a/test/vector_test.cpp +++ b/test/vector_test.cpp @@ -225,7 +225,7 @@ bool test_span_conversion() #endif //BOOST_VECTOR_TEST_HAS_SPAN struct POD { int POD::*ptr; }; -BOOST_STATIC_ASSERT_MSG +BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::container::dtl::is_pod::value , "POD test failed" ); @@ -382,7 +382,7 @@ int main() typedef boost::container::vector cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG + BOOST_CONTAINER_STATIC_ASSERT_MSG ( !boost::has_trivial_destructor_after_move::value || (boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value) @@ -394,7 +394,7 @@ int main() typedef boost::container::vector > cont; typedef cont::allocator_type allocator_type; typedef boost::container::allocator_traits::pointer pointer; - BOOST_STATIC_ASSERT_MSG + BOOST_CONTAINER_STATIC_ASSERT_MSG ( !boost::has_trivial_destructor_after_move::value || (boost::has_trivial_destructor_after_move::value == boost::has_trivial_destructor_after_move::value) diff --git a/test/vector_test.hpp b/test/vector_test.hpp index ded1360..9ebe4a0 100644 --- a/test/vector_test.hpp +++ b/test/vector_test.hpp @@ -22,7 +22,6 @@ #include #include #include -#include #include "print_container.hpp" #include "check_equal_containers.hpp" @@ -347,7 +346,7 @@ int vector_move_assignable_only(boost::container::dtl::true_type) IntType aux_vect[50]; for(int i = 0; i < 50; ++i){ IntType new_int(-1); - BOOST_STATIC_ASSERT((boost::container::test::is_copyable::value == false)); + BOOST_CONTAINER_STATIC_ASSERT((boost::container::test::is_copyable::value == false)); aux_vect[i] = boost::move(new_int); } int aux_vect2[50];