Remove Boost.StaticAsser dependency

This commit is contained in:
Ion Gaztañaga
2024-01-02 19:46:05 +01:00
parent 716ec48861
commit 7c74232a40
62 changed files with 344 additions and 348 deletions

View File

@ -41,8 +41,6 @@
#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <boost/static_assert.hpp>
#ifndef BOOST_NO_EXCEPTIONS
#include <stdexcept>
#endif // BOOST_NO_EXCEPTIONS

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
//[doc_custom_deque
#include <boost/container/deque.hpp>
#include <boost/static_assert.hpp>
//Make sure assertions are active
#ifdef NDEBUG

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
//[doc_custom_devector
#include <boost/container/devector.hpp>
#include <boost/static_assert.hpp>
//Make sure assertions are active
#ifdef NDEBUG
@ -29,7 +28,7 @@ int main ()
//Size-optimized devector is smaller than the default one.
typedef devector<int, new_allocator<int>, size_option_t > size_optimized_devector_t;
BOOST_STATIC_ASSERT(( sizeof(size_optimized_devector_t) < sizeof(devector<int>) ));
assert(( sizeof(size_optimized_devector_t) < sizeof(devector<int>) ));
//Requesting capacity for more elements than representable by "unsigned char" is an error
bool exception_thrown = false;

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
//[doc_custom_small_vector
#include <boost/container/small_vector.hpp>
#include <boost/static_assert.hpp>
//Make sure assertions are active
#ifdef NDEBUG

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
//[doc_custom_static_vector
#include <boost/container/static_vector.hpp>
#include <boost/static_assert.hpp>
//Make sure assertions are active
#ifdef NDEBUG

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
//[doc_custom_vector
#include <boost/container/vector.hpp>
#include <boost/static_assert.hpp>
//Make sure assertions are active
#ifdef NDEBUG
@ -27,7 +26,7 @@ int main ()
//Size-optimized vector is smaller than the default one.
typedef vector<int, new_allocator<int>, size_option_t > size_optimized_vector_t;
BOOST_STATIC_ASSERT(( sizeof(size_optimized_vector_t) < sizeof(vector<int>) ));
assert(( sizeof(size_optimized_vector_t) < sizeof(vector<int>) ));
//Requesting capacity for more elements than representable by "unsigned char"
//is an error in the size optimized vector.

View File

@ -34,7 +34,6 @@
#include <boost/move/detail/force_ptr.hpp>
#include <boost/assert.hpp>
#include <boost/static_assert.hpp>
#include <boost/move/utility_core.hpp>
#include <cstddef>
@ -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
<sizeof(T), NodesPerBlock, MaxFreeBlocks, OverheadPercent> 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<dlmalloc_memchain *>(&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<dlmalloc_memchain *>(&chain)))){

View File

@ -26,7 +26,6 @@
#include <boost/container/throw_exception.hpp>
#include <boost/container/detail/dlmalloc.hpp>
#include <boost/container/detail/multiallocation_chain.hpp>
#include <boost/static_assert.hpp>
#include <boost/move/detail/force_ptr.hpp>
@ -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());

View File

@ -44,8 +44,6 @@
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#include <boost/move/detail/fwd_macros.hpp>
#endif
// other boost
#include <boost/static_assert.hpp>
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED

View File

@ -75,7 +75,7 @@ struct deque_value_traits
template<class T, std::size_t BlockBytes, std::size_t BlockSize>
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));
};

View File

@ -27,7 +27,6 @@
#include <boost/container/allocator_traits.hpp>
#include <boost/container/detail/type_traits.hpp>
#include <boost/container/detail/value_init.hpp>
#include <boost/static_assert.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/intrusive/detail/reverse_iterator.hpp>
@ -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<iterator_from_iiterator>::value));
BOOST_CONTAINER_STATIC_ASSERT((is_bidirectional_iterator<iterator_from_iiterator>::value));
--this->m_iit; return *this;
}

View File

@ -28,7 +28,6 @@
#include <boost/container/detail/workaround.hpp>
#include <climits>
#include <boost/static_assert.hpp>
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;

View File

@ -26,8 +26,6 @@
// container/detail
#include <boost/container/detail/min_max.hpp>
#include <boost/static_assert.hpp>
namespace boost {
namespace container {
namespace dtl {
@ -35,10 +33,10 @@ namespace dtl {
template<unsigned Minimum, unsigned Numerator, unsigned Denominator>
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<class SizeType>
SizeType operator()(const SizeType cur_cap, const SizeType add_min_cap, const SizeType max_cap) const

View File

@ -505,7 +505,7 @@ struct node_alloc_holder
typename NodeAlloc::multiallocation_chain chain;
allocator_node_destroyer_and_chain_builder<NodeAlloc> builder(this->node_alloc(), chain);
this->icont().clear_and_dispose(builder);
//BOOST_STATIC_ASSERT((::boost::has_move_emulation_enabled<typename NodeAlloc::multiallocation_chain>::value == true));
//BOOST_CONTAINER_STATIC_ASSERT((::boost::has_move_emulation_enabled<typename NodeAlloc::multiallocation_chain>::value == true));
if(!chain.empty())
this->node_alloc().deallocate_individual(chain);
}

View File

@ -25,7 +25,6 @@
#include <boost/container/container_fwd.hpp>
#include <boost/container/detail/workaround.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/mpl.hpp>
#include <boost/container/detail/type_traits.hpp>
#include <boost/container/detail/mpl.hpp>
@ -166,35 +165,35 @@ struct pair
pair()
: first(), second()
{
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
//pair copy assignment
pair(const pair& x)
: first(x.first), second(x.second)
{
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
//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<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
template <class D, class S>
pair(const pair<D, S> &p)
: first(p.first), second(p.second)
{
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
template <class D, class S>
pair(BOOST_RV_REF_BEG pair<D, S> 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<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
//pair from two values
@ -202,7 +201,7 @@ struct pair
: first(t1)
, second(t2)
{
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
template<class U, class V>
@ -210,34 +209,34 @@ struct pair
: first(::boost::forward<U>(u))
, second(::boost::forward<V>(v))
{
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
//And now compatibility with std::pair
pair(const std::pair<T1, T2>& x)
: first(x.first), second(x.second)
{
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
template <class D, class S>
pair(const std::pair<D, S>& p)
: first(p.first), second(p.second)
{
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
pair(BOOST_RV_REF_BEG std::pair<T1, T2> 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<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
template <class D, class S>
pair(BOOST_RV_REF_BEG std::pair<D, S> 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<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
#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<KeyType>(k)), second(::boost::forward<Args>(args)...)\
{
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
#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<KeyType>(k)), second(BOOST_MOVE_FWD##N)\
{\
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));\
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));\
}\
//
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<T1, T2>) == sizeof(pair<T1, T2>)));\
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));\
}\
//
BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE)
@ -299,7 +298,7 @@ struct pair
pair(piecewise_construct_t, Tuple<Args1...> t1, Tuple<Args2...> t2)
: pair(t1, t2, typename build_number_seq<sizeof...(Args1)>::type(), typename build_number_seq<sizeof...(Args2)>::type())
{
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
# else
//piecewise construction from variadic tuple (suboptimal, without delegating constructors)
@ -319,7 +318,7 @@ struct pair
: first (build_from_args<first_type> (::boost::move(t1)))
, second (build_from_args<second_type>(::boost::move(t2)))
{
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));
}
# endif //BOOST_NO_CXX11_VARIADIC_TEMPLATES
#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 520)
@ -332,7 +331,7 @@ struct pair
, StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::std::tr1::_Nil)> q)\
: first(BOOST_MOVE_GET_IDX##N), second(BOOST_MOVE_GET_IDXQ##M)\
{ (void)p; (void)q;\
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));\
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));\
}\
//
BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE)
@ -353,7 +352,7 @@ struct pair
, StdTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(BOOST_MOVE_ADD(_VARIADIC_MAX, 3),M),::std::_Nil) > q)\
: first(BOOST_MOVE_GET_IDX##N), second(BOOST_MOVE_GET_IDXQ##M)\
{ (void)p; (void)q;\
BOOST_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));\
BOOST_CONTAINER_STATIC_ASSERT((sizeof(std::pair<T1, T2>) == sizeof(pair<T1, T2>)));\
}\
//
BOOST_MOVE_ITER2D_0TOMAX(BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT, BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE)

View File

@ -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<bool B>
struct STATIC_ASSERTION_FAILURE;
template<>
struct STATIC_ASSERTION_FAILURE<true> {};
template<unsigned> 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<bool(B)>)>\
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

View File

@ -198,7 +198,7 @@ class flat_map
typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type;
//AllocatorOrContainer::value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, value_type>::value));
BOOST_CONTAINER_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, 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<Key, T>
BOOST_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, value_type>::value));
BOOST_CONTAINER_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, value_type>::value));
//////////////////////////////////////////////
//

View File

@ -44,8 +44,6 @@
// intrusive/detail
#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//less, equal
// other
#include <boost/static_assert.hpp>
// std
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
#include <initializer_list>
@ -130,7 +128,7 @@ class map
(insert_return_type_base<iterator BOOST_MOVE_I node_type>) insert_return_type;
//allocator_type::value_type type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((dtl::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
BOOST_CONTAINER_STATIC_ASSERT((dtl::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
//////////////////////////////////////////////
//
@ -1460,7 +1458,7 @@ class multimap
<key_type BOOST_MOVE_I mapped_type> >) node_type;
//allocator_type::value_type type must be std::pair<CONST Key, T>
BOOST_STATIC_ASSERT((dtl::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
BOOST_CONTAINER_STATIC_ASSERT((dtl::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
//////////////////////////////////////////////
//

View File

@ -30,7 +30,6 @@
#include <boost/container/detail/singleton.hpp>
#include <boost/assert.hpp>
#include <boost/static_assert.hpp>
#include <cstddef>
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
<sizeof(T), NodesPerBlock> shared_pool_t;
typedef dtl::singleton_default<shared_pool_t> 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
<sizeof(T), NodesPerBlock> shared_pool_t;
typedef dtl::singleton_default<shared_pool_t> 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
<sizeof(T), NodesPerBlock> shared_pool_t;
typedef dtl::singleton_default<shared_pool_t> 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
<sizeof(T), NodesPerBlock> shared_pool_t;
typedef dtl::singleton_default<shared_pool_t> 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();

View File

@ -21,7 +21,6 @@
#include <boost/container/detail/config_begin.hpp>
#include <boost/container/detail/workaround.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/placement_new.hpp>
#include <boost/move/detail/to_raw_pointer.hpp>
#include <boost/container/allocator_traits.hpp>
@ -258,7 +257,7 @@ class node_handle
//! <b>Throws</b>: Nothing.
value_type& value() const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT((dtl::is_same<KeyMapped, void>::value));
BOOST_CONTAINER_STATIC_ASSERT((dtl::is_same<KeyMapped, void>::value));
BOOST_ASSERT(!empty());
return m_ptr->get_data();
}
@ -273,7 +272,7 @@ class node_handle
//! <b>Requires</b>: Modifying the key through the returned reference is permitted.
key_type& key() const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT((!dtl::is_same<KeyMapped, void>::value));
BOOST_CONTAINER_STATIC_ASSERT((!dtl::is_same<KeyMapped, void>::value));
BOOST_ASSERT(!empty());
return const_cast<key_type &>(KeyMapped().key_of_value(m_ptr->get_data()));
}
@ -286,7 +285,7 @@ class node_handle
//! <b>Throws</b>: Nothing.
mapped_type& mapped() const BOOST_NOEXCEPT
{
BOOST_STATIC_ASSERT((!dtl::is_same<KeyMapped, void>::value));
BOOST_CONTAINER_STATIC_ASSERT((!dtl::is_same<KeyMapped, void>::value));
BOOST_ASSERT(!empty());
return KeyMapped().mapped_of_value(m_ptr->get_data());
}

View File

@ -23,8 +23,8 @@
#include <boost/container/detail/config_begin.hpp>
#include <boost/container/container_fwd.hpp>
#include <boost/container/detail/workaround.hpp>
#include <boost/intrusive/pack_options.hpp>
#include <boost/static_assert.hpp>
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;

View File

@ -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<typename Allocator::value_type, char>::value));
BOOST_CONTAINER_STATIC_ASSERT((boost::container::dtl::is_same<typename Allocator::value_type, char>::value));
}
#endif

View File

@ -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<T>::value;
typename dtl::aligned_storage<sizeof(T)*N, final_alignment>::type storage;
};

View File

@ -49,8 +49,6 @@
#include <boost/move/adl_move_swap.hpp>
#include <boost/move/traits.hpp>
#include <boost/static_assert.hpp>
#include <iosfwd>
#include <istream> //
#include <ostream>
@ -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;
}

View File

@ -822,7 +822,7 @@ private:
typedef value_less<T> 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<stored_size_type, alloc_size_type>::value) );
typedef typename dtl::version<allocator_type>::type alloc_version;
@ -1094,7 +1094,7 @@ private:
//! <b>Complexity</b>: 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)
//! <b>Effects</b>: Constructs a vector that will use a copy of allocator a

View File

@ -20,7 +20,6 @@
#include <boost/container/detail/placement_new.hpp>
#include <boost/intrusive/linear_slist_algorithms.hpp>
#include <boost/intrusive/detail/math.hpp>
#include <boost/static_assert.hpp>
#include <cstddef>
@ -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<pool_options_default_max_blocks_per_chunk>::value);
BOOST_STATIC_ASSERT(bi::detail::static_is_pow2<pool_options_minimum_largest_required_pool_block>::value);
BOOST_CONTAINER_STATIC_ASSERT(bi::detail::static_is_pow2<pool_options_default_max_blocks_per_chunk>::value);
BOOST_CONTAINER_STATIC_ASSERT(bi::detail::static_is_pow2<pool_options_minimum_largest_required_pool_block>::value);
//unsynchronized_pool_resource

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <cstddef>
#include <boost/container/allocator_traits.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
#include <boost/container/detail/function_detector.hpp>
#include <boost/move/utility_core.hpp>
@ -250,66 +249,66 @@ int main()
test_void_allocator();
//SimpleAllocator
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::value_type, int>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::pointer, int*>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::const_pointer, const int*>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::void_pointer, void*>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::const_void_pointer, const void*>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::difference_type, std::ptrdiff_t>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::size_type, std::size_t>::value ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< SimpleAllocator<int> >::propagate_on_container_copy_assignment::value == false ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< SimpleAllocator<int> >::propagate_on_container_move_assignment::value == false ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< SimpleAllocator<int> >::propagate_on_container_swap::value == false ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< SimpleAllocator<int> >::is_always_equal::value == true ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< SimpleAllocator<int> >::is_partially_propagable::value == false ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::rebind_traits<double>::allocator_type
, SimpleAllocator<double> >::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::rebind_alloc<double>::value_type
, double >::value ));
//ComplexAllocator
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::value_type, int>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::pointer, SimpleSmartPtr<int> >::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::const_pointer, SimpleSmartPtr<const int> >::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::void_pointer, SimpleSmartPtr<void> >::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::const_void_pointer, SimpleSmartPtr<const void> >::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::difference_type, signed short>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::size_type, unsigned short>::value ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< ComplexAllocator<int> >::propagate_on_container_copy_assignment::value == true ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< ComplexAllocator<int> >::propagate_on_container_move_assignment::value == true ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< ComplexAllocator<int> >::propagate_on_container_swap::value == true ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< ComplexAllocator<int> >::is_always_equal::value == false ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< ComplexAllocator<int> >::is_partially_propagable::value == true ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::rebind_traits<double>::allocator_type
, ComplexAllocator<double> >::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::rebind_alloc<double>::value_type
, double >::value ));

View File

@ -421,7 +421,7 @@ int main ()
typedef boost::container::deque<int> cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move<cont>::value !=
BOOST_CONTAINER_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value)
, "has_trivial_destructor_after_move(std::allocator) test failed");
@ -431,7 +431,7 @@ int main ()
typedef boost::container::deque<int, std::allocator<int> > cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move<cont>::value !=
BOOST_CONTAINER_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value)
, "has_trivial_destructor_after_move(std::allocator) test failed");

View File

@ -56,7 +56,7 @@ void test_stored_size_type()
//Test size reduction
{
typedef devector<unsigned char, void, options_t> 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<unsigned char>) );
}

View File

@ -24,7 +24,6 @@
#include "propagate_allocator_test.hpp"
#include "check_equal_containers.hpp"
#include "movable_int.hpp"
#include <boost/static_assert.hpp>
#include <boost/algorithm/cxx14/equal.hpp>
@ -4045,7 +4044,7 @@ int main()
typedef boost::container::devector<int> cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move<cont>::value !=
BOOST_CONTAINER_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value)
, "has_trivial_destructor_after_move(std::allocator) test failed");
@ -4055,7 +4054,7 @@ int main()
typedef boost::container::devector<int, std::allocator<int> > cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move<cont>::value !=
BOOST_CONTAINER_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value)
, "has_trivial_destructor_after_move(std::allocator) test failed");

View File

@ -14,7 +14,6 @@
#include <boost/container/vector.hpp>
#include <boost/container/devector.hpp>
#include <boost/container/deque.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/container_or_allocator_rebind.hpp>
@ -117,12 +116,12 @@ int main()
typedef flat_map<int, float, std::less<int>, small_vector<std::pair<int, float>, 10> > map_container_t;
typedef flat_multimap<int, float, std::less<int>, small_vector<std::pair<int, float>, 10> > multimap_container_t;
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<map_container_t, small_flat_map<int, float, 10> >::value ));
BOOST_STATIC_ASSERT(( is_same<multimap_container_t, small_flat_multimap<int, float, 10> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<map_container_t, small_flat_map<int, float, 10> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<multimap_container_t, small_flat_multimap<int, float, 10> >::value ));
#endif
BOOST_STATIC_ASSERT(( is_same<map_container_t, small_flat_map_of<int, float, 10>::type >::value ));
BOOST_STATIC_ASSERT(( is_same<multimap_container_t, small_flat_multimap_of<int, float, 10>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<map_container_t, small_flat_map_of<int, float, 10>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<multimap_container_t, small_flat_multimap_of<int, float, 10>::type >::value ));
}
return 0;

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <vector>
#include <boost/static_assert.hpp>
#include <boost/container/flat_map.hpp>
#include <boost/container/allocator.hpp>
#include <boost/container/detail/container_or_allocator_rebind.hpp>
@ -463,8 +462,8 @@ struct get_real_stored_allocator<flat_multimap<Key, T, Compare, Allocator> >
bool test_heterogeneous_lookups()
{
BOOST_STATIC_ASSERT((dtl::is_transparent<less_transparent>::value));
BOOST_STATIC_ASSERT(!(dtl::is_transparent<std::less<int> >::value));
BOOST_CONTAINER_STATIC_ASSERT((dtl::is_transparent<less_transparent>::value));
BOOST_CONTAINER_STATIC_ASSERT(!(dtl::is_transparent<std::less<int> >::value));
typedef flat_map<int, char, less_transparent> map_t;
typedef flat_multimap<int, char, less_transparent> mmap_t;
typedef map_t::value_type value_type;
@ -776,7 +775,7 @@ int main()
typedef boost::container::new_allocator<value_t> alloc_or_cont_t;
typedef boost::container::flat_map<int, int> cont;
typedef boost::container::dtl::flat_tree<value_t, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
BOOST_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move<cont>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<tree>::value
, "has_trivial_destructor_after_move(flat_map, default) test failed");
}
@ -785,7 +784,7 @@ int main()
typedef boost::container::vector<value_t> alloc_or_cont_t;
typedef boost::container::flat_map<int, int, std::less<int>, alloc_or_cont_t> cont;
typedef boost::container::dtl::flat_tree<value_t, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
BOOST_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move<cont>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<tree>::value
, "has_trivial_destructor_after_move(flat_map, vector) test failed");
}
@ -794,7 +793,7 @@ int main()
typedef std::vector<value_t> alloc_or_cont_t;
typedef boost::container::flat_map<int, int, std::less<int>, alloc_or_cont_t> cont;
typedef boost::container::dtl::flat_tree<value_t, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
BOOST_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move<cont>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<tree>::value
, "has_trivial_destructor_after_move(flat_map, std::vector) test failed");
}
@ -803,7 +802,7 @@ int main()
typedef boost::container::new_allocator<value_t> alloc_or_cont_t;
typedef boost::container::flat_multimap<int, int> cont;
typedef boost::container::dtl::flat_tree<value_t, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
BOOST_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move<cont>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<tree>::value
, "has_trivial_destructor_after_move(flat_multimap, default) test failed");
}
@ -812,7 +811,7 @@ int main()
typedef boost::container::vector<value_t> alloc_or_cont_t;
typedef boost::container::flat_multimap<int, int, std::less<int>, alloc_or_cont_t> cont;
typedef boost::container::dtl::flat_tree<value_t, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
BOOST_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move<cont>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG( boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<tree>::value
, "has_trivial_destructor_after_move(flat_multimap, vector) test failed");
}
@ -821,7 +820,7 @@ int main()
typedef std::vector<value_t> alloc_or_cont_t;
typedef boost::container::flat_multimap<int, int, std::less<int>, alloc_or_cont_t> cont;
typedef boost::container::dtl::flat_tree<value_t, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
BOOST_STATIC_ASSERT_MSG (boost::has_trivial_destructor_after_move<cont>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG (boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<tree>::value
, "has_trivial_destructor_after_move(flat_multimap, std::vector) test failed");
}

View File

@ -14,7 +14,6 @@
#include <boost/container/vector.hpp>
#include <boost/container/deque.hpp>
#include <boost/container/devector.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/container_or_allocator_rebind.hpp>
@ -113,11 +112,11 @@ int main()
typedef flat_set<int, std::less<int>, small_vector<int, 10> > set_container_t;
typedef flat_multiset<int, std::less<int>, small_vector<int, 10> > multiset_container_t;
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<set_container_t, small_flat_set<int, 10> >::value ));
BOOST_STATIC_ASSERT(( is_same<multiset_container_t, small_flat_multiset<int, 10> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<set_container_t, small_flat_set<int, 10> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<multiset_container_t, small_flat_multiset<int, 10> >::value ));
#endif
BOOST_STATIC_ASSERT(( is_same<set_container_t, small_flat_set_of<int, 10>::type >::value ));
BOOST_STATIC_ASSERT(( is_same<multiset_container_t, small_flat_multiset_of<int, 10>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<set_container_t, small_flat_set_of<int, 10>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<multiset_container_t, small_flat_multiset_of<int, 10>::type >::value ));
}
return 0;

View File

@ -870,7 +870,7 @@ int main()
{
typedef boost::container::flat_set<int> cont;
typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, void> tree;
BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<tree>::value
, "has_trivial_destructor_after_move(flat_set, default) test failed");
}
@ -879,7 +879,7 @@ int main()
typedef boost::container::vector<int> alloc_or_cont_t;
typedef boost::container::flat_set<int, std::less<int>, alloc_or_cont_t> cont;
typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<tree>::value
, "has_trivial_destructor_after_move(flat_set, vector) test failed");
}
@ -888,7 +888,7 @@ int main()
typedef std::vector<int> alloc_or_cont_t;
typedef boost::container::flat_set<int, std::less<int>, alloc_or_cont_t> cont;
typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<tree>::value
, "has_trivial_destructor_after_move(flat_set, std::vector) test failed");
}
@ -896,7 +896,7 @@ int main()
{
typedef boost::container::flat_multiset<int> cont;
typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, void> tree;
BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<tree>::value
, "has_trivial_destructor_after_move(flat_multiset, default) test failed");
}
@ -905,7 +905,7 @@ int main()
typedef boost::container::vector<int> alloc_or_cont_t;
typedef boost::container::flat_multiset<int, std::less<int>, alloc_or_cont_t> cont;
typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<tree>::value
, "has_trivial_destructor_after_move(flat_multiset, vector) test failed");
}
@ -914,7 +914,7 @@ int main()
typedef std::vector<int> alloc_or_cont_t;
typedef boost::container::flat_multiset<int, std::less<int>, alloc_or_cont_t> cont;
typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<tree>::value
, "has_trivial_destructor_after_move(flat_multiset, std::vector) test failed");
}

View File

@ -11,7 +11,6 @@
#include <boost/container/small_vector.hpp>
#include <boost/container/stable_vector.hpp>
#include <boost/container/static_vector.hpp>
#include <boost/static_assert.hpp>
#include <iostream>
@ -133,7 +132,7 @@ int main ()
std::less<int>, void> tree;
typedef tree::container_type container_type;
typedef tree::key_compare key_compare;
BOOST_STATIC_ASSERT_MSG ((boost::has_trivial_destructor_after_move<tree>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG ((boost::has_trivial_destructor_after_move<tree>::value ==
boost::has_trivial_destructor_after_move<container_type>::value &&
boost::has_trivial_destructor_after_move<key_compare>::value)
, "has_trivial_destructor_after_move(default allocator) test failed");
@ -144,7 +143,7 @@ int main ()
std::less<int>, std::allocator<int> > tree;
typedef tree::container_type container_type;
typedef tree::key_compare key_compare;
BOOST_STATIC_ASSERT_MSG( (boost::has_trivial_destructor_after_move<tree>::value ==
BOOST_CONTAINER_STATIC_ASSERT_MSG( (boost::has_trivial_destructor_after_move<tree>::value ==
boost::has_trivial_destructor_after_move<container_type>::value &&
boost::has_trivial_destructor_after_move<key_compare>::value)
, "has_trivial_destructor_after_move(std::allocator) test failed");

View File

@ -263,7 +263,7 @@ int main ()
typedef boost::container::list<int> cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value)
@ -274,7 +274,7 @@ int main ()
typedef boost::container::list<int, std::allocator<int> > cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value)

View File

@ -643,8 +643,8 @@ int main ()
typedef multimap< int*, int*, std::less<int*>, std::allocator< std::pair<int *const, int*> >
, tree_assoc_options< optimize_size<false>, tree_type<avl_tree> >::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<int, int> cont;
typedef boost::container::dtl::tree<value_type, int, std::less<int>, void, void> tree;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<tree>::value)
, "has_trivial_destructor_after_move(map, default allocator) test failed");
@ -667,7 +667,7 @@ int main ()
{
typedef boost::container::map<int, int, std::less<int>, std::allocator<value_type> > cont;
typedef boost::container::dtl::tree<value_type, int, std::less<int>, std::allocator<value_type>, void> tree;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<tree>::value)
, "has_trivial_destructor_after_move(map, std::allocator) test failed");
@ -680,7 +680,7 @@ int main ()
// default allocator
typedef boost::container::multimap<int, int> cont;
typedef boost::container::dtl::tree<value_type, int, std::less<int>, void, void> tree;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<tree>::value)
, "has_trivial_destructor_after_move(multimap, default allocator) test failed");
@ -689,7 +689,7 @@ int main ()
{
typedef boost::container::multimap<int, int, std::less<int>, std::allocator<value_type> > cont;
typedef boost::container::dtl::tree<value_type, int, std::less<int>, std::allocator<value_type>, void> tree;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<tree>::value)
, "has_trivial_destructor_after_move(multimap, std::allocator) test failed");

View File

@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/core/lightweight_test.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/node_handle.hpp>
#include <boost/container/new_allocator.hpp>
#include <boost/move/utility_core.hpp>
@ -177,16 +176,16 @@ typedef allocator_traits<node_alloc_t>::portable_rebind_alloc<test_pair>::type v
void test_types()
{
//set
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_set_t::value_type, test_pair>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_set_t::key_type, test_pair>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_set_t::mapped_type, test_pair>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_set_t::allocator_type, value_allocator_type>::value ));
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same<node_handle_set_t::value_type, test_pair>::value ));
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same<node_handle_set_t::key_type, test_pair>::value ));
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same<node_handle_set_t::mapped_type, test_pair>::value ));
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same<node_handle_set_t::allocator_type, value_allocator_type>::value ));
//map
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_map_t::value_type, test_pair>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_map_t::key_type, int>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_map_t::mapped_type, unsigned>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same<node_handle_map_t::allocator_type, value_allocator_type>::value ));
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same<node_handle_map_t::value_type, test_pair>::value ));
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same<node_handle_map_t::key_type, int>::value ));
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same<node_handle_map_t::mapped_type, unsigned>::value ));
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same<node_handle_map_t::allocator_type, value_allocator_type>::value ));
}
void test_default_constructor()

View File

@ -22,7 +22,6 @@
#include <boost/intrusive/detail/mpl.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/static_assert.hpp>
#include <cstring>
#include <iterator>
#include <new>
@ -37,14 +36,14 @@ static buffer_t buffer_0xFF;
template<class Iterator>
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<class Iterator>
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();
}

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/pmr/deque.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
int main()
@ -18,9 +17,9 @@ int main()
using boost::container::dtl::is_same;
typedef deque<int, pmr::polymorphic_allocator<int> > intcontainer_t;
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::deque_of<int>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::deque_of<int>::type >::value ));
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::deque<int> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::deque<int> >::value ));
#endif
return 0;
}

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/pmr/devector.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
int main()
@ -18,9 +17,9 @@ int main()
using boost::container::dtl::is_same;
typedef devector<int, growth_factor_60, pmr::polymorphic_allocator<int> > intcontainer_t;
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::devector_of<int>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::devector_of<int>::type >::value ));
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::devector<int> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::devector<int> >::value ));
#endif
return 0;
}

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/pmr/flat_map.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
int main()
@ -18,9 +17,9 @@ int main()
using boost::container::dtl::is_same;
typedef flat_map<int, float, std::less<int>, pmr::polymorphic_allocator<std::pair<int, float> > > intcontainer_t;
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::flat_map_of<int, float>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::flat_map_of<int, float>::type >::value ));
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::flat_map<int, float> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::flat_map<int, float> >::value ));
#endif
return 0;
}

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/pmr/flat_set.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
int main()
@ -18,9 +17,9 @@ int main()
using boost::container::dtl::is_same;
typedef flat_set<int, std::less<int>, pmr::polymorphic_allocator<int> > intcontainer_t;
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::flat_set_of<int>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::flat_set_of<int>::type >::value ));
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::flat_set<int> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::flat_set<int> >::value ));
#endif
return 0;
}

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/pmr/list.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
int main()
@ -18,9 +17,9 @@ int main()
using boost::container::dtl::is_same;
typedef list<int, pmr::polymorphic_allocator<int> > intcontainer_t;
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::list_of<int>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::list_of<int>::type >::value ));
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::list<int> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::list<int> >::value ));
#endif
return 0;
}

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/pmr/map.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
int main()
@ -18,9 +17,9 @@ int main()
using boost::container::dtl::is_same;
typedef map<int, float, std::less<int>, pmr::polymorphic_allocator<std::pair<const int, float> > > intcontainer_t;
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::map_of<int, float>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::map_of<int, float>::type >::value ));
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::map<int, float> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::map<int, float> >::value ));
#endif
return 0;
}

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/pmr/set.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
int main()
@ -18,9 +17,9 @@ int main()
using boost::container::dtl::is_same;
typedef set<int, std::less<int>, pmr::polymorphic_allocator<int> > intcontainer_t;
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::set_of<int>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::set_of<int>::type >::value ));
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::set<int> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::set<int> >::value ));
#endif
return 0;
}

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/pmr/small_vector.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
int main()
@ -18,9 +17,9 @@ int main()
using boost::container::dtl::is_same;
typedef small_vector<int, 2, pmr::polymorphic_allocator<int> > intcontainer_t;
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::small_vector_of<int, 2>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::small_vector_of<int, 2>::type >::value ));
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::small_vector<int, 2> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::small_vector<int, 2> >::value ));
#endif
return 0;
}

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/pmr/stable_vector.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
int main()
@ -18,9 +17,9 @@ int main()
using boost::container::dtl::is_same;
typedef stable_vector<int, pmr::polymorphic_allocator<int> > intcontainer_t;
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::stable_vector_of<int>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::stable_vector_of<int>::type >::value ));
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::stable_vector<int> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::stable_vector<int> >::value ));
#endif
return 0;
}

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/pmr/string.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
int main()
@ -19,13 +18,13 @@ int main()
typedef basic_string<char, std::char_traits<char>, pmr::polymorphic_allocator<char> > string_t;
typedef basic_string<wchar_t, std::char_traits<wchar_t>, pmr::polymorphic_allocator<wchar_t> > wstring_t;
BOOST_STATIC_ASSERT(( is_same<string_t, pmr::string>::value ));
BOOST_STATIC_ASSERT(( is_same<string_t, pmr::basic_string_of<char>::type>::value ));
BOOST_STATIC_ASSERT(( is_same<wstring_t, pmr::wstring>::value ));
BOOST_STATIC_ASSERT(( is_same<wstring_t, pmr::basic_string_of<wchar_t>::type>::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<string_t, pmr::string>::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<string_t, pmr::basic_string_of<char>::type>::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<wstring_t, pmr::wstring>::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<wstring_t, pmr::basic_string_of<wchar_t>::type>::value ));
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<string_t, pmr::string >::value ));
BOOST_STATIC_ASSERT(( is_same<wstring_t, pmr::wstring >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<string_t, pmr::string >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<wstring_t, pmr::wstring >::value ));
#endif
return 0;
}

View File

@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/container/pmr/vector.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
int main()
@ -18,9 +17,9 @@ int main()
using boost::container::dtl::is_same;
typedef vector<int, pmr::polymorphic_allocator<int> > intcontainer_t;
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::vector_of<int>::type >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::vector_of<int>::type >::value ));
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
BOOST_STATIC_ASSERT(( is_same<intcontainer_t, pmr::vector<int> >::value ));
BOOST_CONTAINER_STATIC_ASSERT(( is_same<intcontainer_t, pmr::vector<int> >::value ));
#endif
return 0;
}

View File

@ -51,7 +51,6 @@ struct mark_on_destructor
bool mark_on_destructor::destroyed = false;
#include <boost/container/scoped_allocator.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/vector.hpp>
#include <boost/container/detail/pair.hpp>
@ -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<OuterAlloc>::value_type
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::value_type
, Scoped0Inner::value_type>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::value_type
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::value_type
, Scoped1Inner::value_type>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::value_type
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::value_type
, Scoped2Inner::value_type>::value ));
//size_type
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::size_type
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::size_type
, Scoped0Inner::size_type>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::size_type
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::size_type
, Scoped1Inner::size_type>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::size_type
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::size_type
, Scoped2Inner::size_type>::value ));
//difference_type
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::difference_type
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::difference_type
, Scoped0Inner::difference_type>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::difference_type
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::difference_type
, Scoped1Inner::difference_type>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::difference_type
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::difference_type
, Scoped2Inner::difference_type>::value ));
//pointer
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::pointer
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::pointer
, Scoped0Inner::pointer>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::pointer
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::pointer
, Scoped1Inner::pointer>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::pointer
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::pointer
, Scoped2Inner::pointer>::value ));
//const_pointer
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_pointer
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_pointer
, Scoped0Inner::const_pointer>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_pointer
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_pointer
, Scoped1Inner::const_pointer>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_pointer
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_pointer
, Scoped2Inner::const_pointer>::value ));
//void_pointer
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::void_pointer
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::void_pointer
, Scoped0Inner::void_pointer>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::void_pointer
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::void_pointer
, Scoped1Inner::void_pointer>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::void_pointer
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::void_pointer
, Scoped2Inner::void_pointer>::value ));
//const_void_pointer
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_void_pointer
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_void_pointer
, Scoped0Inner::const_void_pointer>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_void_pointer
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_void_pointer
, Scoped1Inner::const_void_pointer>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_void_pointer
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< allocator_traits<OuterAlloc>::const_void_pointer
, Scoped2Inner::const_void_pointer>::value ));
//rebind
BOOST_STATIC_ASSERT(( dtl::is_same<Scoped0Inner::rebind< tagged_integer<9> >::other
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same<Scoped0Inner::rebind< tagged_integer<9> >::other
, Rebound9Scoped0Inner >::value ));
BOOST_STATIC_ASSERT(( dtl::is_same<Scoped1Inner::rebind< tagged_integer<9> >::other
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same<Scoped1Inner::rebind< tagged_integer<9> >::other
, Rebound9Scoped1Inner >::value ));
BOOST_STATIC_ASSERT(( dtl::is_same<Scoped2Inner::rebind< tagged_integer<9> >::other
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same<Scoped2Inner::rebind< tagged_integer<9> >::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<InnerAlloc1>
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< scoped_allocator_adaptor<InnerAlloc1>
, Scoped1Inner::inner_allocator_type>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same< scoped_allocator_adaptor<InnerAlloc1, InnerAlloc2>
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same< scoped_allocator_adaptor<InnerAlloc1, InnerAlloc2>
, 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
<ScopedScoped0Inner::outer_allocator_type>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same
< outermost_allocator<ScopedScoped0Inner>::type
, Outer10IdAlloc
>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same
< ScopedScoped0Inner::outer_allocator_type
, scoped_allocator_adaptor<Outer10IdAlloc>
>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same
< scoped_allocator_adaptor<Outer10IdAlloc>::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
<ScopedScoped1Inner::outer_allocator_type>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same
< outermost_allocator<ScopedScoped1Inner>::type
, Outer10IdAlloc
>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same
< ScopedScoped1Inner::outer_allocator_type
, scoped_allocator_adaptor<Outer10IdAlloc, Inner11IdAlloc1>
>::value ));
BOOST_STATIC_ASSERT(( dtl::is_same
BOOST_CONTAINER_STATIC_ASSERT(( dtl::is_same
< scoped_allocator_adaptor<Outer10IdAlloc, Inner11IdAlloc1>::outer_allocator_type
, Outer10IdAlloc
>::value ));
BOOST_STATIC_ASSERT(( !
BOOST_CONTAINER_STATIC_ASSERT(( !
uses_allocator
< ::allocator_argument_tester<ConstructibleSuffix, 10>
, ScopedScoped1Inner::inner_allocator_type::outer_allocator_type

View File

@ -590,8 +590,8 @@ int main ()
typedef multiset< int*, std::less<int*>, std::allocator<int*>
, tree_assoc_options< optimize_size<false>, tree_type<avl_tree> >::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<int> cont;
typedef boost::container::dtl::tree<int, void, std::less<int>, void, void> tree;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<tree>::value)
, "has_trivial_destructor_after_move(set, default allocator) test failed");
@ -635,7 +635,7 @@ int main ()
{
typedef boost::container::set<int, std::less<int>, std::allocator<int> > cont;
typedef boost::container::dtl::tree<int, void, std::less<int>, std::allocator<int>, void> tree;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<tree>::value)
, "has_trivial_destructor_after_move(set, std::allocator) test failed");
@ -644,7 +644,7 @@ int main ()
{
typedef boost::container::multiset<int> cont;
typedef boost::container::dtl::tree<int, void, std::less<int>, void, void> tree;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<tree>::value)
, "has_trivial_destructor_after_move(multiset, default allocator) test failed");
@ -653,7 +653,7 @@ int main ()
{
typedef boost::container::multiset<int, std::less<int>, std::allocator<int> > cont;
typedef boost::container::dtl::tree<int, void, std::less<int>, std::allocator<int>, void> tree;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<tree>::value)
, "has_trivial_destructor_after_move(multiset, std::allocator) test failed");

View File

@ -266,7 +266,7 @@ int main ()
typedef boost::container::slist<int> cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value)
@ -277,7 +277,7 @@ int main ()
typedef boost::container::slist<int, std::allocator<int> > cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value)

View File

@ -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<int>::value);
BOOST_CONTAINER_STATIC_ASSERT(extended_alignment > dtl::alignment_of<int>::value);
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
using options_t = small_vector_options_t< inplace_alignment<extended_alignment> >;
#else

View File

@ -40,7 +40,7 @@ bool test_small_vector_base_test()
typedef boost::container::small_vector_base<int> smb_t;
{
typedef boost::container::small_vector<int, 5> 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<int, 7> 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);

View File

@ -204,7 +204,7 @@ int main()
typedef boost::container::stable_vector<int> cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value)
@ -215,7 +215,7 @@ int main()
typedef boost::container::stable_vector<int, std::allocator<int> > cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG(
BOOST_CONTAINER_STATIC_ASSERT_MSG(
!(boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value)

View File

@ -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<int>::value);
BOOST_CONTAINER_STATIC_ASSERT(extended_alignment > dtl::alignment_of<int>::value);
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
using options_t = static_vector_options_t< inplace_alignment<extended_alignment> >;
#else

View File

@ -21,7 +21,7 @@ template <typename T, size_t N>
void test_ctor_ndc()
{
static_vector<T, N> s;
BOOST_STATIC_ASSERT((static_vector<T, N>::static_capacity) == N);
BOOST_CONTAINER_STATIC_ASSERT((static_vector<T, N>::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 <typename T, size_t N>
void test_ctor_nc(size_t n)
{
static_vector<T, N> s(n);
BOOST_STATIC_ASSERT((static_vector<T, N>::static_capacity) == N);
BOOST_CONTAINER_STATIC_ASSERT((static_vector<T, N>::static_capacity) == N);
BOOST_TEST(s.size() == n);
BOOST_TEST(s.capacity() == N);
BOOST_TEST(s.max_size() == N);
@ -52,7 +52,7 @@ template <typename T, size_t N>
void test_ctor_nd(size_t n, T const& v)
{
static_vector<T, N> s(n, v);
BOOST_STATIC_ASSERT((static_vector<T, N>::static_capacity) == N);
BOOST_CONTAINER_STATIC_ASSERT((static_vector<T, N>::static_capacity) == N);
BOOST_TEST(s.size() == n);
BOOST_TEST(s.capacity() == N);
BOOST_TEST_THROWS( (void)s.at(n), out_of_range_t);

View File

@ -595,7 +595,7 @@ int main()
typedef boost::container::basic_string<char> cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG
BOOST_CONTAINER_STATIC_ASSERT_MSG
( (boost::has_trivial_destructor_after_move<cont>::value ==
(boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value)),
@ -606,7 +606,7 @@ int main()
typedef boost::container::basic_string<char, std::char_traits<char>, std::allocator<char> > cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG
BOOST_CONTAINER_STATIC_ASSERT_MSG
( (boost::has_trivial_destructor_after_move<cont>::value ==
(boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value)),

View File

@ -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<NotUsesAllocator, 0>
, propagation_test_allocator<float, 0>
>::value ));
BOOST_STATIC_ASSERT(( true == uses_allocator
BOOST_CONTAINER_STATIC_ASSERT(( true == uses_allocator
< allocator_argument_tester<ConstructiblePrefix, 0>
, propagation_test_allocator<float, 0>
>::value ));
BOOST_STATIC_ASSERT(( true == uses_allocator
BOOST_CONTAINER_STATIC_ASSERT(( true == uses_allocator
< allocator_argument_tester<ConstructibleSuffix, 0>
, propagation_test_allocator<float, 0>
>::value ));
BOOST_STATIC_ASSERT(( true == uses_allocator
BOOST_CONTAINER_STATIC_ASSERT(( true == uses_allocator
< allocator_argument_tester<ErasedTypeSuffix, 0>
, propagation_test_allocator<float, 0>
>::value ));
BOOST_STATIC_ASSERT(( true == uses_allocator
BOOST_CONTAINER_STATIC_ASSERT(( true == uses_allocator
< allocator_argument_tester<ErasedTypePrefix, 0>
, propagation_test_allocator<float, 0>
>::value ));
BOOST_STATIC_ASSERT(( true == constructible_with_allocator_prefix
BOOST_CONTAINER_STATIC_ASSERT(( true == constructible_with_allocator_prefix
< allocator_argument_tester<ConstructiblePrefix, 0> >::value ));
BOOST_STATIC_ASSERT(( true == constructible_with_allocator_suffix
BOOST_CONTAINER_STATIC_ASSERT(( true == constructible_with_allocator_suffix
< allocator_argument_tester<ConstructibleSuffix, 0> >::value ));
BOOST_STATIC_ASSERT(( true == constructible_with_allocator_prefix
BOOST_CONTAINER_STATIC_ASSERT(( true == constructible_with_allocator_prefix
< allocator_argument_tester<ErasedTypePrefix, 0> >::value ));
BOOST_STATIC_ASSERT(( true == constructible_with_allocator_suffix
BOOST_CONTAINER_STATIC_ASSERT(( true == constructible_with_allocator_suffix
< allocator_argument_tester<ErasedTypeSuffix, 0> >::value ));
return 0;
}

View File

@ -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<POD>::value
, "POD test failed"
);
@ -382,7 +382,7 @@ int main()
typedef boost::container::vector<int> cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG
BOOST_CONTAINER_STATIC_ASSERT_MSG
( !boost::has_trivial_destructor_after_move<pointer>::value ||
(boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<allocator_type>::value)
@ -394,7 +394,7 @@ int main()
typedef boost::container::vector<int, std::allocator<int> > cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
BOOST_STATIC_ASSERT_MSG
BOOST_CONTAINER_STATIC_ASSERT_MSG
( !boost::has_trivial_destructor_after_move<pointer>::value ||
(boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<allocator_type>::value)

View File

@ -22,7 +22,6 @@
#include <boost/move/utility_core.hpp>
#include <boost/move/iterator.hpp>
#include <boost/move/make_unique.hpp>
#include <boost/static_assert.hpp>
#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<boost::container::test::movable_int>::value == false));
BOOST_CONTAINER_STATIC_ASSERT((boost::container::test::is_copyable<boost::container::test::movable_int>::value == false));
aux_vect[i] = boost::move(new_int);
}
int aux_vect2[50];