mirror of
https://github.com/boostorg/container.git
synced 2025-08-01 05:24:31 +02:00
Use BOOST_STATIC_CONSTEXPR where applicable
This commit is contained in:
@@ -71,10 +71,10 @@ class adaptive_pool
|
||||
BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version)
|
||||
> self_t;
|
||||
|
||||
static const std::size_t nodes_per_block = NodesPerBlock;
|
||||
static const std::size_t max_free_blocks = MaxFreeBlocks;
|
||||
static const std::size_t overhead_percent = OverheadPercent;
|
||||
static const std::size_t real_nodes_per_block = NodesPerBlock;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t nodes_per_block = NodesPerBlock;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t max_free_blocks = MaxFreeBlocks;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t overhead_percent = OverheadPercent;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t real_nodes_per_block = NodesPerBlock;
|
||||
|
||||
BOOST_CONTAINER_DOCIGN(BOOST_CONTAINER_STATIC_ASSERT((Version <=2)));
|
||||
|
||||
@@ -384,10 +384,10 @@ class private_adaptive_pool
|
||||
BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version)
|
||||
> self_t;
|
||||
|
||||
static const std::size_t nodes_per_block = NodesPerBlock;
|
||||
static const std::size_t max_free_blocks = MaxFreeBlocks;
|
||||
static const std::size_t overhead_percent = OverheadPercent;
|
||||
static const std::size_t real_nodes_per_block = NodesPerBlock;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t nodes_per_block = NodesPerBlock;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t max_free_blocks = MaxFreeBlocks;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t overhead_percent = OverheadPercent;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t real_nodes_per_block = NodesPerBlock;
|
||||
|
||||
BOOST_CONTAINER_DOCIGN(BOOST_CONTAINER_STATIC_ASSERT((Version <=2)));
|
||||
|
||||
|
@@ -115,7 +115,7 @@ class allocator
|
||||
template<class T2, unsigned int Version2, unsigned int AllocationDisableMask2>
|
||||
allocator& operator=(const allocator<T2, Version2, AllocationDisableMask2>&);
|
||||
|
||||
static const unsigned int ForbiddenMask =
|
||||
BOOST_STATIC_CONSTEXPR unsigned int ForbiddenMask =
|
||||
BOOST_CONTAINER_ALLOCATE_NEW | BOOST_CONTAINER_EXPAND_BWD | BOOST_CONTAINER_EXPAND_FWD ;
|
||||
|
||||
//The mask can't disable all the allocation types
|
||||
|
@@ -240,19 +240,19 @@ namespace dtl {
|
||||
//supporting rvalue references
|
||||
template<class Allocator>
|
||||
struct is_std_allocator
|
||||
{ static const bool value = false; };
|
||||
{ BOOST_STATIC_CONSTEXPR bool value = false; };
|
||||
|
||||
template<class T>
|
||||
struct is_std_allocator< std::allocator<T> >
|
||||
{ static const bool value = true; };
|
||||
{ BOOST_STATIC_CONSTEXPR bool value = true; };
|
||||
|
||||
template<class T, class Options>
|
||||
struct is_std_allocator< small_vector_allocator<T, std::allocator<T>, Options > >
|
||||
{ static const bool value = true; };
|
||||
{ BOOST_STATIC_CONSTEXPR bool value = true; };
|
||||
|
||||
template<class Allocator>
|
||||
struct is_not_std_allocator
|
||||
{ static const bool value = !is_std_allocator<Allocator>::value; };
|
||||
{ BOOST_STATIC_CONSTEXPR bool value = !is_std_allocator<Allocator>::value; };
|
||||
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(const_pointer)
|
||||
@@ -498,7 +498,7 @@ struct allocator_traits
|
||||
template <class T, class ...Args>
|
||||
inline static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args)
|
||||
{
|
||||
static const bool value = ::boost::move_detail::and_
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::move_detail::and_
|
||||
< dtl::is_not_std_allocator<Allocator>
|
||||
, boost::container::dtl::has_member_function_callable_with_construct
|
||||
< Allocator, T*, Args... >
|
||||
@@ -567,7 +567,7 @@ struct allocator_traits
|
||||
template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
inline static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{\
|
||||
static const bool value = ::boost::move_detail::and_ \
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::move_detail::and_ \
|
||||
< dtl::is_not_std_allocator<Allocator> \
|
||||
, boost::container::dtl::has_member_function_callable_with_construct \
|
||||
< Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_FWD_T##N > \
|
||||
|
@@ -277,10 +277,10 @@ class basic_string;
|
||||
typedef basic_string <char> string;
|
||||
typedef basic_string<wchar_t> wstring;
|
||||
|
||||
static const std::size_t ADP_nodes_per_block = 256u;
|
||||
static const std::size_t ADP_max_free_blocks = 2u;
|
||||
static const std::size_t ADP_overhead_percent = 1u;
|
||||
static const std::size_t ADP_only_alignment = 0u;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t ADP_nodes_per_block = 256u;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t ADP_max_free_blocks = 2u;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t ADP_overhead_percent = 1u;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t ADP_only_alignment = 0u;
|
||||
|
||||
template < class T
|
||||
, std::size_t NodesPerBlock = ADP_nodes_per_block
|
||||
@@ -295,7 +295,7 @@ template < class T
|
||||
, unsigned int AllocationDisableMask = 0>
|
||||
class allocator;
|
||||
|
||||
static const std::size_t NodeAlloc_nodes_per_block = 256u;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t NodeAlloc_nodes_per_block = 256u;
|
||||
|
||||
template
|
||||
< class T
|
||||
|
@@ -68,16 +68,16 @@ template <class T>
|
||||
struct deque_value_traits
|
||||
{
|
||||
typedef T value_type;
|
||||
static const bool trivial_dctr = dtl::is_trivially_destructible<value_type>::value;
|
||||
static const bool trivial_dctr_after_move = ::boost::has_trivial_destructor_after_move<value_type>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool trivial_dctr = dtl::is_trivially_destructible<value_type>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool trivial_dctr_after_move = ::boost::has_trivial_destructor_after_move<value_type>::value;
|
||||
};
|
||||
|
||||
template<class T, std::size_t BlockBytes, std::size_t BlockSize>
|
||||
struct deque_block_size
|
||||
{
|
||||
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));
|
||||
BOOST_STATIC_CONSTEXPR std::size_t block_bytes = BlockBytes ? BlockBytes : 512u;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t value = BlockSize ? BlockSize : (sizeof(T) < block_bytes ? (block_bytes/sizeof(T)) : std::size_t(1));
|
||||
};
|
||||
|
||||
namespace dtl {
|
||||
@@ -2870,7 +2870,7 @@ struct has_trivial_destructor_after_move<boost::container::deque<T, Allocator, O
|
||||
{
|
||||
typedef typename boost::container::deque<T, Allocator, Options>::allocator_type allocator_type;
|
||||
typedef typename ::boost::container::allocator_traits<allocator_type>::pointer pointer;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value;
|
||||
};
|
||||
|
||||
|
@@ -76,7 +76,7 @@ class private_adaptive_node_pool
|
||||
private_adaptive_node_pool &operator=(const private_adaptive_node_pool &);
|
||||
|
||||
public:
|
||||
static const std::size_t nodes_per_block = NodesPerBlock;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t nodes_per_block = NodesPerBlock;
|
||||
|
||||
//!Constructor. Never throws
|
||||
private_adaptive_node_pool()
|
||||
|
@@ -213,11 +213,11 @@ template<class MultiallocationChain, class VoidPointer, class SizeType, unsigned
|
||||
struct adaptive_pool_types
|
||||
{
|
||||
typedef VoidPointer void_pointer;
|
||||
static const unsigned ordered = (Flags & (adaptive_pool_flag::size_ordered | adaptive_pool_flag::address_ordered));
|
||||
BOOST_STATIC_CONSTEXPR unsigned ordered = (Flags & (adaptive_pool_flag::size_ordered | adaptive_pool_flag::address_ordered));
|
||||
typedef block_container_traits<VoidPointer, SizeType, ordered> block_container_traits_t;
|
||||
typedef typename block_container_traits_t::hook_t hook_t;
|
||||
typedef hdr_offset_holder_t<SizeType> hdr_offset_holder;
|
||||
static const unsigned int order_flags = Flags & (adaptive_pool_flag::size_ordered | adaptive_pool_flag::address_ordered);
|
||||
BOOST_STATIC_CONSTEXPR unsigned int order_flags = Flags & (adaptive_pool_flag::size_ordered | adaptive_pool_flag::address_ordered);
|
||||
typedef MultiallocationChain free_nodes_t;
|
||||
|
||||
struct block_info_t
|
||||
@@ -253,11 +253,11 @@ template< std::size_t alignment
|
||||
, std::size_t overhead_percent>
|
||||
struct candidate_power_of_2_ct_helper
|
||||
{
|
||||
static const std::size_t hdr_subblock_elements_alone = (alignment - hdr_size - payload_per_allocation)/real_node_size;
|
||||
static const std::size_t hdr_subblock_elements_first = (alignment - hdr_size - payload_per_allocation)/real_node_size;
|
||||
static const std::size_t elements_per_b_subblock_mid = (alignment - hdr_offset_size)/real_node_size;
|
||||
static const std::size_t elements_per_b_subblock_end = (alignment - hdr_offset_size - payload_per_allocation)/real_node_size;
|
||||
static const std::size_t num_b_subblock =
|
||||
BOOST_STATIC_CONSTEXPR std::size_t hdr_subblock_elements_alone = (alignment - hdr_size - payload_per_allocation)/real_node_size;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t hdr_subblock_elements_first = (alignment - hdr_size - payload_per_allocation)/real_node_size;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t elements_per_b_subblock_mid = (alignment - hdr_offset_size)/real_node_size;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t elements_per_b_subblock_end = (alignment - hdr_offset_size - payload_per_allocation)/real_node_size;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t num_b_subblock =
|
||||
hdr_subblock_elements_alone >= min_elements_per_block
|
||||
? 0
|
||||
: ( ((hdr_subblock_elements_first + elements_per_b_subblock_end) >= min_elements_per_block)
|
||||
@@ -266,18 +266,18 @@ struct candidate_power_of_2_ct_helper
|
||||
)
|
||||
;
|
||||
|
||||
static const std::size_t num_b_subblock_mid = (num_b_subblock > 1) ? (num_b_subblock - 1) : 0;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t num_b_subblock_mid = (num_b_subblock > 1) ? (num_b_subblock - 1) : 0;
|
||||
|
||||
static const std::size_t total_nodes = (num_b_subblock == 0)
|
||||
BOOST_STATIC_CONSTEXPR std::size_t total_nodes = (num_b_subblock == 0)
|
||||
? hdr_subblock_elements_alone
|
||||
: ( (num_b_subblock == 1)
|
||||
? (hdr_subblock_elements_first + elements_per_b_subblock_end)
|
||||
: (hdr_subblock_elements_first + num_b_subblock_mid*elements_per_b_subblock_mid + elements_per_b_subblock_end)
|
||||
)
|
||||
;
|
||||
static const std::size_t total_data = total_nodes*real_node_size;
|
||||
static const std::size_t total_size = alignment*(num_b_subblock+1);
|
||||
static const bool overhead_satisfied = (total_size - total_data)*100/total_size < overhead_percent;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t total_data = total_nodes*real_node_size;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t total_size = alignment*(num_b_subblock+1);
|
||||
BOOST_STATIC_CONSTEXPR bool overhead_satisfied = (total_size - total_data)*100/total_size < overhead_percent;
|
||||
};
|
||||
|
||||
template< std::size_t initial_alignment
|
||||
@@ -299,7 +299,7 @@ struct candidate_power_of_2_ct
|
||||
, hdr_offset_size
|
||||
, overhead_percent> helper_t;
|
||||
|
||||
static const std::size_t candidate_power_of_2 = initial_alignment << std::size_t(!helper_t::overhead_satisfied);
|
||||
BOOST_STATIC_CONSTEXPR std::size_t candidate_power_of_2 = initial_alignment << std::size_t(!helper_t::overhead_satisfied);
|
||||
|
||||
typedef typename candidate_power_of_2_ct
|
||||
< candidate_power_of_2
|
||||
@@ -312,9 +312,9 @@ struct candidate_power_of_2_ct
|
||||
, !helper_t::overhead_satisfied
|
||||
>::type type;
|
||||
|
||||
static const std::size_t alignment = type::alignment;
|
||||
static const std::size_t num_subblocks = type::num_subblocks;
|
||||
static const std::size_t real_num_node = type::real_num_node;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t alignment = type::alignment;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t num_subblocks = type::num_subblocks;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t real_num_node = type::real_num_node;
|
||||
};
|
||||
|
||||
template< std::size_t initial_alignment
|
||||
@@ -354,9 +354,9 @@ struct candidate_power_of_2_ct
|
||||
, hdr_offset_size
|
||||
, overhead_percent> helper_t;
|
||||
|
||||
static const std::size_t alignment = initial_alignment;
|
||||
static const std::size_t num_subblocks = helper_t::num_b_subblock+1;
|
||||
static const std::size_t real_num_node = helper_t::total_nodes;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t alignment = initial_alignment;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t num_subblocks = helper_t::num_b_subblock+1;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t real_num_node = helper_t::total_nodes;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////
|
||||
@@ -429,13 +429,13 @@ class private_adaptive_node_pool_impl_common
|
||||
typedef typename SegmentManagerBase::size_type size_type;
|
||||
//Flags
|
||||
//align_only
|
||||
static const bool AlignOnly = (Flags & adaptive_pool_flag::align_only) != 0;
|
||||
BOOST_STATIC_CONSTEXPR bool AlignOnly = (Flags & adaptive_pool_flag::align_only) != 0;
|
||||
typedef bool_<AlignOnly> IsAlignOnly;
|
||||
typedef true_ AlignOnlyTrue;
|
||||
typedef false_ AlignOnlyFalse;
|
||||
|
||||
typedef typename SegmentManagerBase::void_pointer void_pointer;
|
||||
static const typename SegmentManagerBase::
|
||||
BOOST_STATIC_CONSTEXPR typename SegmentManagerBase::
|
||||
size_type PayloadPerAllocation = SegmentManagerBase::PayloadPerAllocation;
|
||||
|
||||
typedef typename boost::intrusive::pointer_traits
|
||||
@@ -453,9 +453,9 @@ class private_adaptive_node_pool_impl_common
|
||||
typedef typename adaptive_pool_types_t::hdr_offset_holder hdr_offset_holder;
|
||||
typedef private_adaptive_node_pool_impl_common this_type;
|
||||
|
||||
static const size_type MaxAlign = alignment_of<void_pointer>::value;
|
||||
static const size_type HdrSize = ((sizeof(block_info_t)-1)/MaxAlign+1)*MaxAlign;
|
||||
static const size_type HdrOffsetSize = ((sizeof(hdr_offset_holder)-1)/MaxAlign+1)*MaxAlign;
|
||||
BOOST_STATIC_CONSTEXPR size_type MaxAlign = alignment_of<void_pointer>::value;
|
||||
BOOST_STATIC_CONSTEXPR size_type HdrSize = ((sizeof(block_info_t)-1)/MaxAlign+1)*MaxAlign;
|
||||
BOOST_STATIC_CONSTEXPR size_type HdrOffsetSize = ((sizeof(hdr_offset_holder)-1)/MaxAlign+1)*MaxAlign;
|
||||
|
||||
segment_mngr_base_ptr_t mp_segment_mngr_base; //Segment manager
|
||||
block_container_t m_block_container; //Intrusive block list
|
||||
@@ -981,9 +981,9 @@ template< class SizeType
|
||||
, bool AlignOnly>
|
||||
struct calculate_alignment_ct
|
||||
{
|
||||
static const std::size_t alignment = upper_power_of_2_ct<SizeType, HdrSize + RealNodeSize*NodesPerBlock>::value;
|
||||
static const std::size_t num_subblocks = 0;
|
||||
static const std::size_t real_num_node = (alignment - PayloadPerAllocation - HdrSize)/RealNodeSize;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t alignment = upper_power_of_2_ct<SizeType, HdrSize + RealNodeSize*NodesPerBlock>::value;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t num_subblocks = 0;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t real_num_node = (alignment - PayloadPerAllocation - HdrSize)/RealNodeSize;
|
||||
};
|
||||
|
||||
template< class SizeType
|
||||
@@ -1013,9 +1013,9 @@ struct calculate_alignment_ct
|
||||
, OverheadPercent
|
||||
>::type type;
|
||||
|
||||
static const std::size_t alignment = type::alignment;
|
||||
static const std::size_t num_subblocks = type::num_subblocks;
|
||||
static const std::size_t real_num_node = type::real_num_node;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t alignment = type::alignment;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t num_subblocks = type::num_subblocks;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t real_num_node = type::real_num_node;
|
||||
};
|
||||
|
||||
|
||||
@@ -1046,17 +1046,17 @@ class private_adaptive_node_pool_impl_ct
|
||||
typedef typename base_t::multiallocation_chain multiallocation_chain;
|
||||
typedef typename base_t::segment_manager_base_type segment_manager_base_type;
|
||||
|
||||
static const typename base_t::size_type PayloadPerAllocation = base_t::PayloadPerAllocation;
|
||||
BOOST_STATIC_CONSTEXPR typename base_t::size_type PayloadPerAllocation = base_t::PayloadPerAllocation;
|
||||
|
||||
//align_only
|
||||
static const bool AlignOnly = base_t::AlignOnly;
|
||||
BOOST_STATIC_CONSTEXPR bool AlignOnly = base_t::AlignOnly;
|
||||
|
||||
private:
|
||||
static const size_type MaxAlign = base_t::MaxAlign;
|
||||
static const size_type HdrSize = base_t::HdrSize;
|
||||
static const size_type HdrOffsetSize = base_t::HdrOffsetSize;
|
||||
BOOST_STATIC_CONSTEXPR size_type MaxAlign = base_t::MaxAlign;
|
||||
BOOST_STATIC_CONSTEXPR size_type HdrSize = base_t::HdrSize;
|
||||
BOOST_STATIC_CONSTEXPR size_type HdrOffsetSize = base_t::HdrOffsetSize;
|
||||
|
||||
static const size_type RealNodeSize = lcm_ct<NodeSize, alignment_of<void_pointer>::value>::value;
|
||||
BOOST_STATIC_CONSTEXPR size_type RealNodeSize = lcm_ct<NodeSize, alignment_of<void_pointer>::value>::value;
|
||||
|
||||
typedef calculate_alignment_ct
|
||||
< size_type, HdrSize, PayloadPerAllocation
|
||||
@@ -1065,9 +1065,9 @@ class private_adaptive_node_pool_impl_ct
|
||||
//Round the size to a power of two value.
|
||||
//This is the total memory size (including payload) that we want to
|
||||
//allocate from the general-purpose allocator
|
||||
static const size_type NumSubBlocks = data_t::num_subblocks;
|
||||
static const size_type RealNumNode = data_t::real_num_node;
|
||||
static const size_type RealBlockAlignment = data_t::alignment;
|
||||
BOOST_STATIC_CONSTEXPR size_type NumSubBlocks = data_t::num_subblocks;
|
||||
BOOST_STATIC_CONSTEXPR size_type RealNumNode = data_t::real_num_node;
|
||||
BOOST_STATIC_CONSTEXPR size_type RealBlockAlignment = data_t::alignment;
|
||||
|
||||
public:
|
||||
|
||||
@@ -1165,14 +1165,14 @@ class private_adaptive_node_pool_impl_rt
|
||||
typedef typename impl_t::size_type size_type;
|
||||
typedef typename impl_t::multiallocation_chain multiallocation_chain;
|
||||
|
||||
static const typename impl_t::size_type PayloadPerAllocation = impl_t::PayloadPerAllocation;
|
||||
BOOST_STATIC_CONSTEXPR typename impl_t::size_type PayloadPerAllocation = impl_t::PayloadPerAllocation;
|
||||
|
||||
//Flags
|
||||
//align_only
|
||||
static const bool AlignOnly = impl_t::AlignOnly;
|
||||
BOOST_STATIC_CONSTEXPR bool AlignOnly = impl_t::AlignOnly;
|
||||
|
||||
static const size_type HdrSize = impl_t::HdrSize;
|
||||
static const size_type HdrOffsetSize = impl_t::HdrOffsetSize;
|
||||
BOOST_STATIC_CONSTEXPR size_type HdrSize = impl_t::HdrSize;
|
||||
BOOST_STATIC_CONSTEXPR size_type HdrOffsetSize = impl_t::HdrOffsetSize;
|
||||
|
||||
public:
|
||||
|
||||
|
@@ -182,7 +182,7 @@ struct insert_copy_proxy
|
||||
typedef boost::container::allocator_traits<Allocator> alloc_traits;
|
||||
typedef typename alloc_traits::value_type value_type;
|
||||
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_copy_proxy(const value_type &v)
|
||||
: v_(v)
|
||||
@@ -212,7 +212,7 @@ struct insert_move_proxy
|
||||
typedef boost::container::allocator_traits<Allocator> alloc_traits;
|
||||
typedef typename alloc_traits::value_type value_type;
|
||||
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_move_proxy(value_type &v)
|
||||
: v_(v)
|
||||
@@ -265,7 +265,7 @@ struct insert_nonmovable_emplace_proxy
|
||||
typedef typename alloc_traits::value_type value_type;
|
||||
typedef typename build_number_seq<sizeof...(Args)>::type index_tuple_t;
|
||||
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_nonmovable_emplace_proxy(BOOST_FWD_REF(Args)... args)
|
||||
: args_(args...)
|
||||
@@ -296,7 +296,7 @@ struct insert_emplace_proxy
|
||||
typedef typename base_t::value_type value_type;
|
||||
typedef typename base_t::index_tuple_t index_tuple_t;
|
||||
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_emplace_proxy(BOOST_FWD_REF(Args)... args)
|
||||
: base_t(::boost::forward<Args>(args)...)
|
||||
@@ -332,7 +332,7 @@ template<class Allocator>
|
||||
struct insert_emplace_proxy<Allocator, typename boost::container::allocator_traits<Allocator>::value_type>
|
||||
: public insert_move_proxy<Allocator>
|
||||
{
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_emplace_proxy(typename boost::container::allocator_traits<Allocator>::value_type &&v)
|
||||
: insert_move_proxy<Allocator>(v)
|
||||
@@ -349,7 +349,7 @@ struct insert_emplace_proxy<Allocator
|
||||
: public insert_copy_proxy<Allocator>
|
||||
{
|
||||
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
|
||||
: insert_copy_proxy<Allocator>(v)
|
||||
@@ -360,7 +360,7 @@ template<class Allocator>
|
||||
struct insert_emplace_proxy<Allocator, typename boost::container::allocator_traits<Allocator>::value_type &>
|
||||
: public insert_copy_proxy<Allocator>
|
||||
{
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
|
||||
: insert_copy_proxy<Allocator>(v)
|
||||
@@ -373,7 +373,7 @@ struct insert_emplace_proxy<Allocator
|
||||
>
|
||||
: public insert_copy_proxy<Allocator>
|
||||
{
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
|
||||
: insert_copy_proxy<Allocator>(v)
|
||||
@@ -397,7 +397,7 @@ struct insert_nonmovable_emplace_proxy##N\
|
||||
typedef boost::container::allocator_traits<Allocator> alloc_traits;\
|
||||
typedef typename alloc_traits::value_type value_type;\
|
||||
\
|
||||
static const bool single_value = true;\
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;\
|
||||
\
|
||||
inline explicit insert_nonmovable_emplace_proxy##N(BOOST_MOVE_UREF##N)\
|
||||
BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N {}\
|
||||
@@ -426,7 +426,7 @@ struct insert_emplace_proxy_arg##N\
|
||||
typedef typename base_t::value_type value_type;\
|
||||
typedef boost::container::allocator_traits<Allocator> alloc_traits;\
|
||||
\
|
||||
static const bool single_value = true;\
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;\
|
||||
\
|
||||
inline explicit insert_emplace_proxy_arg##N(BOOST_MOVE_UREF##N)\
|
||||
: base_t(BOOST_MOVE_FWD##N){}\
|
||||
@@ -460,7 +460,7 @@ template<class Allocator>
|
||||
struct insert_emplace_proxy_arg1<Allocator, ::boost::rv<typename boost::container::allocator_traits<Allocator>::value_type> >
|
||||
: public insert_move_proxy<Allocator>
|
||||
{
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits<Allocator>::value_type &v)
|
||||
: insert_move_proxy<Allocator>(v)
|
||||
@@ -471,7 +471,7 @@ template<class Allocator>
|
||||
struct insert_emplace_proxy_arg1<Allocator, typename boost::container::allocator_traits<Allocator>::value_type>
|
||||
: public insert_copy_proxy<Allocator>
|
||||
{
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
|
||||
: insert_copy_proxy<Allocator>(v)
|
||||
@@ -485,7 +485,7 @@ template<class Allocator>
|
||||
struct insert_emplace_proxy_arg1<Allocator, typename boost::container::allocator_traits<Allocator>::value_type>
|
||||
: public insert_move_proxy<Allocator>
|
||||
{
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits<Allocator>::value_type &&v)
|
||||
: insert_move_proxy<Allocator>(v)
|
||||
@@ -501,7 +501,7 @@ struct insert_emplace_proxy_arg1<Allocator
|
||||
>
|
||||
: public insert_copy_proxy<Allocator>
|
||||
{
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
|
||||
: insert_copy_proxy<Allocator>(v)
|
||||
@@ -512,7 +512,7 @@ template<class Allocator>
|
||||
struct insert_emplace_proxy_arg1<Allocator, typename boost::container::allocator_traits<Allocator>::value_type &>
|
||||
: public insert_copy_proxy<Allocator>
|
||||
{
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
|
||||
: insert_copy_proxy<Allocator>(v)
|
||||
@@ -525,7 +525,7 @@ struct insert_emplace_proxy_arg1<Allocator
|
||||
>
|
||||
: public insert_copy_proxy<Allocator>
|
||||
{
|
||||
static const bool single_value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool single_value = true;
|
||||
|
||||
inline explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
|
||||
: insert_copy_proxy<Allocator>(v)
|
||||
|
@@ -74,11 +74,11 @@ class block_list_base
|
||||
{
|
||||
list_node m_list;
|
||||
|
||||
static const std::size_t MaxAlignMinus1 = memory_resource::max_align-1u;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t MaxAlignMinus1 = memory_resource::max_align-1u;
|
||||
|
||||
public:
|
||||
|
||||
static const std::size_t header_size = std::size_t(sizeof(DerivedFromBlockListHeader) + MaxAlignMinus1) & std::size_t(~MaxAlignMinus1);
|
||||
BOOST_STATIC_CONSTEXPR std::size_t header_size = std::size_t(sizeof(DerivedFromBlockListHeader) + MaxAlignMinus1) & std::size_t(~MaxAlignMinus1);
|
||||
|
||||
explicit block_list_base()
|
||||
{ list_algo::init_header(&m_list); }
|
||||
|
@@ -68,11 +68,11 @@ class block_slist_base
|
||||
{
|
||||
slist_node m_slist;
|
||||
|
||||
static const std::size_t MaxAlignMinus1 = memory_resource::max_align-1u;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t MaxAlignMinus1 = memory_resource::max_align-1u;
|
||||
|
||||
public:
|
||||
|
||||
static const std::size_t header_size = std::size_t(sizeof(DerivedFromBlockSlistHeader) + MaxAlignMinus1) & std::size_t(~MaxAlignMinus1);
|
||||
BOOST_STATIC_CONSTEXPR std::size_t header_size = std::size_t(sizeof(DerivedFromBlockSlistHeader) + MaxAlignMinus1) & std::size_t(~MaxAlignMinus1);
|
||||
|
||||
explicit block_slist_base()
|
||||
{ slist_algo::init_header(&m_slist); }
|
||||
|
@@ -64,7 +64,7 @@ namespace dtl {
|
||||
template<class I>
|
||||
struct are_elements_contiguous
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
/////////////////////////
|
||||
@@ -74,7 +74,7 @@ struct are_elements_contiguous
|
||||
template<class T>
|
||||
struct are_elements_contiguous<T*>
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
/////////////////////////
|
||||
@@ -115,7 +115,7 @@ namespace dtl {
|
||||
template <class Pointer, bool IsConst>
|
||||
struct are_elements_contiguous<boost::container::vec_iterator<Pointer, IsConst> >
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ struct are_elements_contiguous<boost::container::vec_iterator<Pointer, IsConst>
|
||||
template <class PointedType, class DifferenceType, class OffsetType, std::size_t OffsetAlignment>
|
||||
struct are_elements_contiguous< ::boost::interprocess::offset_ptr<PointedType, DifferenceType, OffsetType, OffsetAlignment> >
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
template <typename I, typename O>
|
||||
@@ -185,20 +185,20 @@ private:
|
||||
template <class U> static two test(int, ...);
|
||||
template <class U> static char test(int, const wrapper<U::single_value>*);
|
||||
public:
|
||||
static const bool value = sizeof(test<T>(0, 0)) == 1;
|
||||
BOOST_STATIC_CONSTEXPR bool value = sizeof(test<T>(0, 0)) == 1;
|
||||
void dummy() {}
|
||||
};
|
||||
|
||||
template<class InsertionProxy, bool = has_single_value<InsertionProxy>::value>
|
||||
struct is_single_value_proxy_impl
|
||||
{
|
||||
static const bool value = InsertionProxy::single_value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = InsertionProxy::single_value;
|
||||
};
|
||||
|
||||
template<class InsertionProxy>
|
||||
struct is_single_value_proxy_impl<InsertionProxy, false>
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template<class InsertionProxy>
|
||||
@@ -293,7 +293,7 @@ template <typename O>
|
||||
struct is_memzero_initializable
|
||||
{
|
||||
typedef typename ::boost::container::iterator_traits<O>::value_type value_type;
|
||||
static const bool value = are_elements_contiguous<O>::value &&
|
||||
BOOST_STATIC_CONSTEXPR bool value = are_elements_contiguous<O>::value &&
|
||||
( dtl::is_integral<value_type>::value || dtl::is_enum<value_type>::value
|
||||
#if defined(BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL)
|
||||
|| dtl::is_pointer<value_type>::value
|
||||
@@ -1496,8 +1496,8 @@ void expand_backward_forward_and_insert_alloc_move_backward
|
||||
{
|
||||
typedef std::size_t size_type;
|
||||
typedef typename allocator_traits<Allocator>::value_type value_type;
|
||||
static const bool trivial_dctr_after_move = has_trivial_destructor_after_move<value_type>::value;
|
||||
static const bool trivial_dctr = dtl::is_trivially_destructible<value_type>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool trivial_dctr_after_move = has_trivial_destructor_after_move<value_type>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool trivial_dctr = dtl::is_trivially_destructible<value_type>::value;
|
||||
|
||||
typedef typename dtl::if_c
|
||||
<trivial_dctr
|
||||
@@ -1796,8 +1796,8 @@ inline void expand_backward_forward_and_insert_alloc_move_forward
|
||||
{
|
||||
typedef std::size_t size_type;
|
||||
typedef typename allocator_traits<Allocator>::value_type value_type;
|
||||
static const bool trivial_dctr_after_move = has_trivial_destructor_after_move<value_type>::value;
|
||||
static const bool trivial_dctr = dtl::is_trivially_destructible<value_type>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool trivial_dctr_after_move = has_trivial_destructor_after_move<value_type>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool trivial_dctr = dtl::is_trivially_destructible<value_type>::value;
|
||||
|
||||
typedef typename dtl::if_c
|
||||
<trivial_dctr
|
||||
|
@@ -62,7 +62,7 @@ namespace dtl {
|
||||
template<class X>
|
||||
static no_type test(...);
|
||||
|
||||
static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
|
||||
BOOST_STATIC_CONSTEXPR bool value = sizeof(test<T>(0)) == sizeof(yes_type);
|
||||
};
|
||||
|
||||
template <class T, class InnerAlloc, class ...Args>
|
||||
|
@@ -583,7 +583,7 @@ class flat_tree
|
||||
(boost::container::dtl::, container_type
|
||||
,stored_allocator_type, allocator_type) stored_allocator_type;
|
||||
|
||||
static const bool has_stored_allocator_type =
|
||||
BOOST_STATIC_CONSTEXPR bool has_stored_allocator_type =
|
||||
BOOST_INTRUSIVE_HAS_TYPE(boost::container::dtl::, container_type, stored_allocator_type);
|
||||
|
||||
private:
|
||||
@@ -1700,7 +1700,7 @@ struct has_trivial_destructor_after_move<boost::container::dtl::flat_tree<T, Key
|
||||
typedef boost::container::dtl::flat_tree<T, KeyOfValue, Compare, AllocatorOrContainer> flat_tree;
|
||||
typedef typename flat_tree::container_type container_type;
|
||||
typedef typename flat_tree::key_compare key_compare;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<container_type>::value &&
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<container_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<key_compare>::value;
|
||||
};
|
||||
|
||||
|
@@ -80,7 +80,7 @@ namespace function_detector {
|
||||
template <class U> \
|
||||
static NotFoundType Test( ... ); \
|
||||
public : \
|
||||
static const int check = NotFound + (sizeof(Test<T>(0, 0)) - sizeof(NotFoundType));\
|
||||
BOOST_STATIC_CONSTEXPR int check = NotFound + (sizeof(Test<T>(0, 0)) - sizeof(NotFoundType));\
|
||||
};\
|
||||
}}} //namespace boost::container::function_detector {
|
||||
|
||||
|
@@ -51,7 +51,7 @@ namespace dtl {
|
||||
template <class Container>
|
||||
struct is_container
|
||||
{
|
||||
static const bool value =
|
||||
BOOST_STATIC_CONSTEXPR bool value =
|
||||
boost::container::is_container_detail::
|
||||
has_member_function_callable_with_size <const Container>::value &&
|
||||
boost::container::is_container_detail::
|
||||
@@ -61,7 +61,7 @@ struct is_container
|
||||
template <>
|
||||
struct is_container<void>
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -51,7 +51,7 @@ namespace dtl {
|
||||
template <class Container>
|
||||
struct is_contiguous_container
|
||||
{
|
||||
static const bool value =
|
||||
BOOST_STATIC_CONSTEXPR bool value =
|
||||
boost::container::is_contiguous_container_detail::
|
||||
has_member_function_callable_with_data<Container>::value &&
|
||||
boost::container::is_contiguous_container_detail::
|
||||
|
@@ -61,25 +61,25 @@ struct pair;
|
||||
template <class T>
|
||||
struct is_pair
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_pair< pair<T1, T2> >
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_pair< std::pair<T1, T2> >
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_not_pair
|
||||
{
|
||||
static const bool value = !is_pair<T>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = !is_pair<T>::value;
|
||||
};
|
||||
|
||||
} //namespace dtl {
|
||||
|
@@ -723,50 +723,50 @@ struct has_iterator_category
|
||||
template <typename X>
|
||||
static two test(int, ...);
|
||||
|
||||
static const bool value = (1 == sizeof(test<T>(0, 0)));
|
||||
BOOST_STATIC_CONSTEXPR bool value = (1 == sizeof(test<T>(0, 0)));
|
||||
};
|
||||
|
||||
|
||||
template<class T, bool = has_iterator_category<T>::value >
|
||||
struct is_input_iterator
|
||||
{
|
||||
static const bool value = is_same<typename T::iterator_category, std::input_iterator_tag>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = is_same<typename T::iterator_category, std::input_iterator_tag>::value;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_input_iterator<T, false>
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_not_input_iterator
|
||||
{
|
||||
static const bool value = !is_input_iterator<T>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = !is_input_iterator<T>::value;
|
||||
};
|
||||
|
||||
template<class T, bool = has_iterator_category<T>::value >
|
||||
struct is_forward_iterator
|
||||
{
|
||||
static const bool value = is_same<typename T::iterator_category, std::forward_iterator_tag>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = is_same<typename T::iterator_category, std::forward_iterator_tag>::value;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_forward_iterator<T, false>
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template<class T, bool = has_iterator_category<T>::value >
|
||||
struct is_bidirectional_iterator
|
||||
{
|
||||
static const bool value = is_same<typename T::iterator_category, std::bidirectional_iterator_tag>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = is_same<typename T::iterator_category, std::bidirectional_iterator_tag>::value;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_bidirectional_iterator<T, false>
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template<class IINodeType>
|
||||
|
@@ -100,7 +100,7 @@ struct upper_power_of_2_loop_ct
|
||||
template <Integer I, Integer P>
|
||||
struct apply
|
||||
{
|
||||
static const Integer value =
|
||||
BOOST_STATIC_CONSTEXPR Integer value =
|
||||
upper_power_of_2_loop_ct<Integer, (I > P*2)>::template apply<I, P*2>::value;
|
||||
};
|
||||
};
|
||||
@@ -111,14 +111,14 @@ struct upper_power_of_2_loop_ct<Integer, false>
|
||||
template <Integer I, Integer P>
|
||||
struct apply
|
||||
{
|
||||
static const Integer value = P;
|
||||
BOOST_STATIC_CONSTEXPR Integer value = P;
|
||||
};
|
||||
};
|
||||
|
||||
template <typename Integer, Integer I>
|
||||
struct upper_power_of_2_ct
|
||||
{
|
||||
static const Integer value = upper_power_of_2_loop_ct<Integer, (I > 1)>::template apply<I, 2>::value;
|
||||
BOOST_STATIC_CONSTEXPR Integer value = upper_power_of_2_loop_ct<Integer, (I > 1)>::template apply<I, 2>::value;
|
||||
};
|
||||
|
||||
//This function uses binary search to discover the
|
||||
@@ -144,27 +144,27 @@ inline std::size_t floor_log2 (std::size_t x)
|
||||
template<std::size_t I1, std::size_t I2>
|
||||
struct gcd_ct
|
||||
{
|
||||
static const std::size_t Max = I1 > I2 ? I1 : I2;
|
||||
static const std::size_t Min = I1 < I2 ? I1 : I2;
|
||||
static const std::size_t value = gcd_ct<Min, Max % Min>::value;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t Max = I1 > I2 ? I1 : I2;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t Min = I1 < I2 ? I1 : I2;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t value = gcd_ct<Min, Max % Min>::value;
|
||||
};
|
||||
|
||||
template<std::size_t I1>
|
||||
struct gcd_ct<I1, 0>
|
||||
{
|
||||
static const std::size_t value = I1;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t value = I1;
|
||||
};
|
||||
|
||||
template<std::size_t I1>
|
||||
struct gcd_ct<0, I1>
|
||||
{
|
||||
static const std::size_t value = I1;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t value = I1;
|
||||
};
|
||||
|
||||
template<std::size_t I1, std::size_t I2>
|
||||
struct lcm_ct
|
||||
{
|
||||
static const std::size_t value = I1 * I2 / gcd_ct<I1, I2>::value;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t value = I1 * I2 / gcd_ct<I1, I2>::value;
|
||||
};
|
||||
|
||||
} // namespace dtl
|
||||
|
@@ -84,13 +84,13 @@ struct void_t { typedef void type; };
|
||||
template <class T, class=void>
|
||||
struct is_transparent_base
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_transparent_base<T, typename void_t<typename T::is_transparent>::type>
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
@@ -112,7 +112,7 @@ template<typename...> using variadic_void_t = void;
|
||||
template<typename Allocator, typename = void>
|
||||
struct is_allocator
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@@ -123,7 +123,7 @@ struct is_allocator < Allocator,
|
||||
variadic_void_t< typename Allocator::value_type
|
||||
, decltype(ctad_declval<Allocator&>().allocate(size_t{})) >>
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
|
@@ -52,7 +52,7 @@ class private_node_pool
|
||||
|
||||
public:
|
||||
typedef typename base_t::multiallocation_chain multiallocation_chain;
|
||||
static const std::size_t nodes_per_block = NodesPerBlock;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t nodes_per_block = NodesPerBlock;
|
||||
|
||||
//!Constructor from a segment manager. Never throws
|
||||
private_node_pool()
|
||||
|
@@ -46,7 +46,7 @@ namespace pair_impl {
|
||||
template <class TupleClass>
|
||||
struct is_boost_tuple
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template <
|
||||
@@ -56,7 +56,7 @@ template <
|
||||
class T9>
|
||||
struct is_boost_tuple< boost::tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
template<class Tuple>
|
||||
@@ -67,13 +67,13 @@ struct disable_if_boost_tuple
|
||||
template<class T>
|
||||
struct is_tuple_null
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_tuple_null<boost::tuples::null_type>
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
} //namespace detail {
|
||||
@@ -482,7 +482,7 @@ inline void swap(pair<T1, T2>& x, pair<T1, T2>& y)
|
||||
template<class T1, class T2>
|
||||
struct has_move_emulation_enabled< ::boost::container::dtl::pair<T1, T2> >
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -497,7 +497,7 @@ struct is_class_or_union< ::boost::container::dtl::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
@@ -505,7 +505,7 @@ struct is_class_or_union< std::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
@@ -516,7 +516,7 @@ struct is_union< ::boost::container::dtl::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
@@ -524,7 +524,7 @@ struct is_union< std::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
@@ -535,7 +535,7 @@ struct is_class< ::boost::container::dtl::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
template <class T1, class T2>
|
||||
@@ -543,7 +543,7 @@ struct is_class< std::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -555,7 +555,7 @@ template<class A, class B>
|
||||
struct is_trivially_copy_assignable
|
||||
<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = false ;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false ;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
@@ -565,7 +565,7 @@ template<class A, class B>
|
||||
struct is_trivially_move_assignable
|
||||
<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
@@ -574,7 +574,7 @@ struct is_trivially_copy_assignable;
|
||||
template<class A, class B>
|
||||
struct is_trivially_copy_constructible<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
@@ -583,7 +583,7 @@ struct is_trivially_move_assignable;
|
||||
template<class A, class B>
|
||||
struct is_trivially_move_constructible<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
@@ -592,7 +592,7 @@ struct is_trivially_destructible;
|
||||
template<class A, class B>
|
||||
struct is_trivially_destructible<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = boost::move_detail::is_trivially_destructible<A>::value &&
|
||||
BOOST_STATIC_CONSTEXPR bool value = boost::move_detail::is_trivially_destructible<A>::value &&
|
||||
boost::move_detail::is_trivially_destructible<B>::value ;
|
||||
};
|
||||
|
||||
|
@@ -45,7 +45,7 @@ struct node_slist
|
||||
template<class T>
|
||||
struct is_stateless_segment_manager
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
} //namespace dtl {
|
||||
|
@@ -39,7 +39,7 @@ struct node_slist_helper
|
||||
struct fake_segment_manager
|
||||
{
|
||||
typedef void * void_pointer;
|
||||
static const std::size_t PayloadPerAllocation = BOOST_CONTAINER_ALLOCATION_PAYLOAD;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t PayloadPerAllocation = BOOST_CONTAINER_ALLOCATION_PAYLOAD;
|
||||
|
||||
typedef boost::container::dtl::
|
||||
basic_multiallocation_chain<void*> multiallocation_chain;
|
||||
@@ -90,7 +90,7 @@ template<>
|
||||
struct is_stateless_segment_manager
|
||||
<boost::container::dtl::fake_segment_manager>
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
} //namespace dtl {
|
||||
|
@@ -251,13 +251,13 @@ struct intrusive_tree_type
|
||||
//Trait to detect manually rebalanceable tree types
|
||||
template<boost::container::tree_type_enum tree_type_value>
|
||||
struct is_manually_balanceable
|
||||
{ static const bool value = true; };
|
||||
{ BOOST_STATIC_CONSTEXPR bool value = true; };
|
||||
|
||||
template<> struct is_manually_balanceable<red_black_tree>
|
||||
{ static const bool value = false; };
|
||||
{ BOOST_STATIC_CONSTEXPR bool value = false; };
|
||||
|
||||
template<> struct is_manually_balanceable<avl_tree>
|
||||
{ static const bool value = false; };
|
||||
{ BOOST_STATIC_CONSTEXPR bool value = false; };
|
||||
|
||||
//Proxy traits to implement different operations depending on the
|
||||
//is_manually_balanceable<>::value
|
||||
@@ -1433,9 +1433,10 @@ struct has_trivial_destructor_after_move
|
||||
{
|
||||
typedef typename ::boost::container::dtl::tree<T, KeyOfValue, Compare, Allocator, Options>::allocator_type allocator_type;
|
||||
typedef typename ::boost::container::allocator_traits<allocator_type>::pointer pointer;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value &&
|
||||
::boost::has_trivial_destructor_after_move<Compare>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value =
|
||||
::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value &&
|
||||
::boost::has_trivial_destructor_after_move<Compare>::value;
|
||||
};
|
||||
|
||||
} //namespace boost {
|
||||
|
@@ -57,20 +57,20 @@ struct has_version
|
||||
template <class U> static two test(...);
|
||||
template <class U> static char test(const typename U::version*);
|
||||
public:
|
||||
static const bool value = sizeof(test<T>(0)) == 1;
|
||||
BOOST_STATIC_CONSTEXPR bool value = sizeof(test<T>(0)) == 1;
|
||||
void dummy(){}
|
||||
};
|
||||
|
||||
template <class T, bool = has_version<T>::value>
|
||||
struct version
|
||||
{
|
||||
static const unsigned value = 1;
|
||||
BOOST_STATIC_CONSTEXPR unsigned value = 1;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct version<T, true>
|
||||
{
|
||||
static const unsigned value = extract_version<T>::type::value;
|
||||
BOOST_STATIC_CONSTEXPR unsigned value = extract_version<T>::type::value;
|
||||
};
|
||||
|
||||
} //namespace impl
|
||||
@@ -83,7 +83,7 @@ struct version
|
||||
template<class T, unsigned N>
|
||||
struct is_version
|
||||
{
|
||||
static const bool value =
|
||||
BOOST_STATIC_CONSTEXPR bool value =
|
||||
is_same< typename version<T>::type, integral_constant<unsigned, N> >::value;
|
||||
};
|
||||
|
||||
|
@@ -147,7 +147,7 @@ class devector
|
||||
typedef typename get_devector_opt<Options, alloc_size_type>::type options_type;
|
||||
typedef typename options_type::growth_factor_type growth_factor_type;
|
||||
typedef typename options_type::stored_size_type stored_size_type;
|
||||
static const std::size_t devector_min_free_fraction =
|
||||
BOOST_STATIC_CONSTEXPR std::size_t devector_min_free_fraction =
|
||||
options_type::free_fraction;
|
||||
|
||||
#endif // ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
@@ -3030,8 +3030,9 @@ struct has_trivial_destructor_after_move<boost::container::devector<T, Allocator
|
||||
{
|
||||
typedef typename boost::container::devector<T, Allocator, Options>::allocator_type allocator_type;
|
||||
typedef typename ::boost::container::allocator_traits<allocator_type>::pointer pointer;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value =
|
||||
::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -1768,7 +1768,7 @@ struct has_trivial_destructor_after_move<boost::container::flat_map<Key, T, Comp
|
||||
typedef ::boost::container::dtl::pair<Key, T> value_t;
|
||||
typedef typename ::boost::container::dtl::container_or_allocator_rebind<AllocatorOrContainer, value_t>::type alloc_or_cont_t;
|
||||
typedef ::boost::container::dtl::flat_tree<value_t,::boost::container::dtl::select1st<Key>, Compare, alloc_or_cont_t> tree;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
};
|
||||
|
||||
namespace container {
|
||||
@@ -3102,7 +3102,7 @@ struct has_trivial_destructor_after_move< boost::container::flat_multimap<Key, T
|
||||
typedef ::boost::container::dtl::pair<Key, T> value_t;
|
||||
typedef typename ::boost::container::dtl::container_or_allocator_rebind<AllocatorOrContainer, value_t>::type alloc_or_cont_t;
|
||||
typedef ::boost::container::dtl::flat_tree<value_t,::boost::container::dtl::select1st<Key>, Compare, alloc_or_cont_t> tree;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
};
|
||||
|
||||
} //namespace boost {
|
||||
|
@@ -1201,7 +1201,7 @@ template <class Key, class Compare, class AllocatorOrContainer>
|
||||
struct has_trivial_destructor_after_move<boost::container::flat_set<Key, Compare, AllocatorOrContainer> >
|
||||
{
|
||||
typedef ::boost::container::dtl::flat_tree<Key, ::boost::container::dtl::identity<Key>, Compare, AllocatorOrContainer> tree;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
};
|
||||
|
||||
namespace container {
|
||||
@@ -1932,7 +1932,7 @@ template <class Key, class Compare, class AllocatorOrContainer>
|
||||
struct has_trivial_destructor_after_move<boost::container::flat_multiset<Key, Compare, AllocatorOrContainer> >
|
||||
{
|
||||
typedef ::boost::container::dtl::flat_tree<Key, ::boost::container::dtl::identity<Key>, Compare, AllocatorOrContainer> tree;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
};
|
||||
|
||||
namespace container {
|
||||
|
@@ -1504,7 +1504,7 @@ struct has_trivial_destructor_after_move<boost::container::list<T, Allocator> >
|
||||
{
|
||||
typedef typename boost::container::list<T, Allocator>::allocator_type allocator_type;
|
||||
typedef typename ::boost::container::allocator_traits<allocator_type>::pointer pointer;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value;
|
||||
};
|
||||
|
||||
|
@@ -1376,7 +1376,7 @@ template <class Key, class T, class Compare, class Allocator, class Options>
|
||||
struct has_trivial_destructor_after_move<boost::container::map<Key, T, Compare, Allocator, Options> >
|
||||
{
|
||||
typedef ::boost::container::dtl::tree<std::pair<const Key, T>, int, Compare, Allocator, Options> tree;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
};
|
||||
|
||||
namespace container {
|
||||
@@ -2298,7 +2298,7 @@ template <class Key, class T, class Compare, class Allocator, class Options>
|
||||
struct has_trivial_destructor_after_move<boost::container::multimap<Key, T, Compare, Allocator, Options> >
|
||||
{
|
||||
typedef ::boost::container::dtl::tree<std::pair<const Key, T>, int, Compare, Allocator, Options> tree;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
};
|
||||
|
||||
namespace container {
|
||||
|
@@ -33,7 +33,7 @@ namespace container {
|
||||
|
||||
template<bool Value>
|
||||
struct new_allocator_bool
|
||||
{ static const bool value = Value; };
|
||||
{ BOOST_STATIC_CONSTEXPR bool value = Value; };
|
||||
|
||||
template<class T>
|
||||
class new_allocator;
|
||||
|
@@ -63,7 +63,7 @@ class node_allocator
|
||||
typedef unsigned int allocation_type;
|
||||
typedef node_allocator<T, NodesPerBlock, Version> self_t;
|
||||
|
||||
static const std::size_t nodes_per_block = NodesPerBlock;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t nodes_per_block = NodesPerBlock;
|
||||
|
||||
BOOST_CONTAINER_STATIC_ASSERT((Version <=2));
|
||||
#endif
|
||||
|
@@ -52,8 +52,8 @@ enum tree_type_enum
|
||||
template<tree_type_enum TreeType, bool OptimizeSize>
|
||||
struct tree_opt
|
||||
{
|
||||
static const boost::container::tree_type_enum tree_type = TreeType;
|
||||
static const bool optimize_size = OptimizeSize;
|
||||
BOOST_STATIC_CONSTEXPR boost::container::tree_type_enum tree_type = TreeType;
|
||||
BOOST_STATIC_CONSTEXPR bool optimize_size = OptimizeSize;
|
||||
};
|
||||
|
||||
typedef tree_opt<red_black_tree, true> tree_assoc_defaults;
|
||||
@@ -116,10 +116,10 @@ using tree_assoc_options_t = typename boost::container::tree_assoc_options<Optio
|
||||
template<bool StoreHash, bool CacheBegin, bool LinearBuckets, bool FastmodBuckets>
|
||||
struct hash_opt
|
||||
{
|
||||
static const bool store_hash = StoreHash;
|
||||
static const bool cache_begin = CacheBegin;
|
||||
static const bool linear_buckets = LinearBuckets;
|
||||
static const bool fastmod_buckets = FastmodBuckets;
|
||||
BOOST_STATIC_CONSTEXPR bool store_hash = StoreHash;
|
||||
BOOST_STATIC_CONSTEXPR bool cache_begin = CacheBegin;
|
||||
BOOST_STATIC_CONSTEXPR bool linear_buckets = LinearBuckets;
|
||||
BOOST_STATIC_CONSTEXPR bool fastmod_buckets = FastmodBuckets;
|
||||
};
|
||||
|
||||
typedef hash_opt<false, false, false, false> hash_assoc_defaults;
|
||||
@@ -203,13 +203,13 @@ struct default_if_void<void, Default>
|
||||
template<std::size_t N, std::size_t DefaultN>
|
||||
struct default_if_zero
|
||||
{
|
||||
static const std::size_t value = N;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t value = N;
|
||||
};
|
||||
|
||||
template<std::size_t DefaultN>
|
||||
struct default_if_zero<0u, DefaultN>
|
||||
{
|
||||
static const std::size_t value = DefaultN;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t value = DefaultN;
|
||||
};
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ template<class GrowthType, std::size_t InplaceAlignment>
|
||||
struct small_vector_opt
|
||||
{
|
||||
typedef GrowthType growth_factor_type;
|
||||
static const std::size_t inplace_alignment = InplaceAlignment;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t inplace_alignment = InplaceAlignment;
|
||||
};
|
||||
|
||||
typedef small_vector_opt<void, 0u> small_vector_null_opt;
|
||||
@@ -430,8 +430,8 @@ BOOST_INTRUSIVE_OPTION_CONSTANT(throw_on_overflow, bool, ThrowOnOverflow, throw_
|
||||
template<bool ThrowOnOverflow, std::size_t InplaceAlignment>
|
||||
struct static_vector_opt
|
||||
{
|
||||
static const bool throw_on_overflow = ThrowOnOverflow;
|
||||
static const std::size_t inplace_alignment = InplaceAlignment;
|
||||
BOOST_STATIC_CONSTEXPR bool throw_on_overflow = ThrowOnOverflow;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t inplace_alignment = InplaceAlignment;
|
||||
};
|
||||
|
||||
typedef static_vector_opt<true, 0u> static_vector_null_opt;
|
||||
@@ -515,7 +515,7 @@ template<class GrowthType, class StoredSizeType, std::size_t FreeFraction>
|
||||
struct devector_opt
|
||||
: vector_opt<GrowthType, StoredSizeType>
|
||||
{
|
||||
static const std::size_t free_fraction = FreeFraction;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t free_fraction = FreeFraction;
|
||||
};
|
||||
|
||||
typedef devector_opt<void, void, 0u> devector_null_opt;
|
||||
@@ -606,8 +606,8 @@ using devector_options_t = typename boost::container::devector_options<Options..
|
||||
template<std::size_t BlockBytes, std::size_t BlockSize>
|
||||
struct deque_opt
|
||||
{
|
||||
static const std::size_t block_bytes = BlockBytes;
|
||||
static const std::size_t block_size = BlockSize;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t block_bytes = BlockBytes;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t block_size = BlockSize;
|
||||
BOOST_CONTAINER_STATIC_ASSERT_MSG(!(block_bytes && block_size), "block_bytes and block_size can't be specified at the same time");
|
||||
};
|
||||
|
||||
|
@@ -32,7 +32,7 @@ class memory_resource
|
||||
{
|
||||
public:
|
||||
// For exposition only
|
||||
static BOOST_CONSTEXPR_OR_CONST std::size_t max_align =
|
||||
BOOST_STATIC_CONSTEXPR std::size_t max_align =
|
||||
boost::move_detail::alignment_of<boost::move_detail::max_align_t>::value;
|
||||
|
||||
//! <b>Effects</b>: Destroys
|
||||
|
@@ -70,7 +70,7 @@ class BOOST_CONTAINER_DECL monotonic_buffer_resource
|
||||
//! to the upstream allocator
|
||||
//!
|
||||
//! <b>Note</b>: Non-standard extension.
|
||||
static const std::size_t initial_next_buffer_size = 32u*sizeof(void*);
|
||||
BOOST_STATIC_CONSTEXPR std::size_t initial_next_buffer_size = 32u*sizeof(void*);
|
||||
|
||||
//! <b>Requires</b>: `upstream` shall be the address of a valid memory resource or `nullptr`
|
||||
//!
|
||||
|
@@ -36,19 +36,19 @@ namespace pmr_dtl {
|
||||
template<class T>
|
||||
struct max_allocator_alignment
|
||||
{
|
||||
static const std::size_t value = 1;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t value = 1;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct max_allocator_alignment< ::boost::container::new_allocator<T> >
|
||||
{
|
||||
static const std::size_t value = boost::move_detail::alignment_of<boost::move_detail::max_align_t>::value;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t value = boost::move_detail::alignment_of<boost::move_detail::max_align_t>::value;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct max_allocator_alignment< std::allocator<T> >
|
||||
{
|
||||
static const std::size_t value = boost::move_detail::alignment_of<boost::move_detail::max_align_t>::value;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t value = boost::move_detail::alignment_of<boost::move_detail::max_align_t>::value;
|
||||
};
|
||||
|
||||
} //namespace pmr_dtl
|
||||
|
@@ -56,7 +56,7 @@ struct is_scoped_allocator_imp
|
||||
template <typename T>
|
||||
static int test(...);
|
||||
|
||||
static const bool value = (sizeof(yes_type) == sizeof(test<Allocator>(0)));
|
||||
BOOST_STATIC_CONSTEXPR bool value = (sizeof(yes_type) == sizeof(test<Allocator>(0)));
|
||||
};
|
||||
|
||||
template<class MaybeScopedAlloc, bool = is_scoped_allocator_imp<MaybeScopedAlloc>::value >
|
||||
|
@@ -1026,7 +1026,7 @@ template <class Key, class Compare, class Allocator, class Options>
|
||||
struct has_trivial_destructor_after_move<boost::container::set<Key, Compare, Allocator, Options> >
|
||||
{
|
||||
typedef ::boost::container::dtl::tree<Key, void, Compare, Allocator, Options> tree;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
};
|
||||
|
||||
namespace container {
|
||||
@@ -1681,7 +1681,7 @@ template <class Key, class Compare, class Allocator, class Options>
|
||||
struct has_trivial_destructor_after_move<boost::container::multiset<Key, Compare, Allocator, Options> >
|
||||
{
|
||||
typedef ::boost::container::dtl::tree<Key, void, Compare, Allocator, Options> tree;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
|
||||
};
|
||||
|
||||
namespace container {
|
||||
|
@@ -1673,7 +1673,7 @@ struct has_trivial_destructor_after_move<boost::container::slist<T, Allocator> >
|
||||
{
|
||||
typedef typename boost::container::slist<T, Allocator>::allocator_type allocator_type;
|
||||
typedef typename ::boost::container::allocator_traits<allocator_type>::pointer pointer;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value;
|
||||
};
|
||||
|
||||
|
@@ -304,13 +304,13 @@ struct small_vector_storage
|
||||
typedef typename dtl::aligned_storage
|
||||
<sizeof(T)*N, Alignment>::type storage_type;
|
||||
storage_type m_storage;
|
||||
static const std::size_t sms_size = sizeof(storage_type)/sizeof(T);
|
||||
BOOST_STATIC_CONSTEXPR std::size_t sms_size = sizeof(storage_type)/sizeof(T);
|
||||
};
|
||||
|
||||
template<class T, std::size_t Alignment>
|
||||
struct small_vector_storage<T, 0u, Alignment>
|
||||
{
|
||||
static const std::size_t sms_size = 0u;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t sms_size = 0u;
|
||||
};
|
||||
|
||||
//! This class consists of common code from all small_vector<T, N> types that don't depend on the
|
||||
@@ -448,7 +448,7 @@ template<class T, std::size_t N, class Options>
|
||||
struct small_vector_storage_definer
|
||||
{
|
||||
typedef typename dtl::get_small_vector_opt<Options>::type options_t;
|
||||
static const std::size_t final_alignment =
|
||||
BOOST_STATIC_CONSTEXPR std::size_t final_alignment =
|
||||
options_t::inplace_alignment ? options_t::inplace_alignment : dtl::alignment_of<T>::value;
|
||||
typedef small_vector_storage<T, N, final_alignment> type;
|
||||
};
|
||||
@@ -557,7 +557,7 @@ class small_vector
|
||||
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
//! @brief The capacity/max size of the container
|
||||
static const size_type static_capacity = small_vector_storage_definer<T, N, Options>::type::sms_size;
|
||||
BOOST_STATIC_CONSTEXPR size_type static_capacity = small_vector_storage_definer<T, N, Options>::type::sms_size;
|
||||
|
||||
public:
|
||||
inline small_vector()
|
||||
@@ -680,7 +680,7 @@ template <class T, class Allocator>
|
||||
struct has_trivial_destructor_after_move<boost::container::vector<T, Allocator> >
|
||||
{
|
||||
typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value;
|
||||
};
|
||||
|
||||
|
@@ -214,7 +214,7 @@ struct index_traits
|
||||
typedef typename index_type::const_iterator const_index_iterator;
|
||||
typedef typename index_type::size_type size_type;
|
||||
|
||||
static const size_type ExtraPointers = 3;
|
||||
BOOST_STATIC_CONSTEXPR size_type ExtraPointers = 3;
|
||||
//Stable vector stores metadata at the end of the index (node_base_ptr vector) with additional 3 pointers:
|
||||
// back() is this->index.back() - ExtraPointers;
|
||||
// end node index is *(this->index.end() - 3)
|
||||
@@ -598,7 +598,7 @@ class stable_vector
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
private:
|
||||
BOOST_COPYABLE_AND_MOVABLE(stable_vector)
|
||||
static const size_type ExtraPointers = index_traits_type::ExtraPointers;
|
||||
BOOST_STATIC_CONSTEXPR size_type ExtraPointers = index_traits_type::ExtraPointers;
|
||||
|
||||
class insert_rollback;
|
||||
friend class insert_rollback;
|
||||
@@ -2255,7 +2255,7 @@ struct has_trivial_destructor_after_move<boost::container::stable_vector<T, Allo
|
||||
{
|
||||
typedef typename boost::container::stable_vector<T, Allocator>::allocator_type allocator_type;
|
||||
typedef typename ::boost::container::allocator_traits<allocator_type>::pointer pointer;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value;
|
||||
};
|
||||
|
||||
|
@@ -66,7 +66,7 @@ class static_storage_allocator
|
||||
inline T* internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return move_detail::launder_cast<T*>(&storage); }
|
||||
|
||||
static const std::size_t internal_capacity = N;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t internal_capacity = N;
|
||||
|
||||
std::size_t max_size() const
|
||||
{ return N; }
|
||||
@@ -86,7 +86,7 @@ class static_storage_allocator
|
||||
|
||||
private:
|
||||
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;
|
||||
BOOST_STATIC_CONSTEXPR std::size_t final_alignment = InplaceAlignment ? InplaceAlignment : dtl::alignment_of<T>::value;
|
||||
typename dtl::aligned_storage<sizeof(T)*N, final_alignment>::type storage;
|
||||
};
|
||||
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
typedef typename base_t::const_reverse_iterator const_reverse_iterator;
|
||||
|
||||
//! @brief The capacity/max size of the container
|
||||
static const size_type static_capacity = Capacity;
|
||||
BOOST_STATIC_CONSTEXPR size_type static_capacity = Capacity;
|
||||
|
||||
//! @brief Constructs an empty static_vector.
|
||||
//!
|
||||
|
@@ -192,13 +192,13 @@ class basic_string_base
|
||||
<sizeof(long_t), dtl::alignment_of<long_t>::value>::type long_raw_t;
|
||||
|
||||
protected:
|
||||
static const size_type MinInternalBufferChars = 8;
|
||||
static const size_type AlignmentOfValueType =
|
||||
BOOST_STATIC_CONSTEXPR size_type MinInternalBufferChars = 8;
|
||||
BOOST_STATIC_CONSTEXPR size_type AlignmentOfValueType =
|
||||
alignment_of<value_type>::value;
|
||||
static const size_type ShortDataOffset = ((sizeof(short_header)-1)/AlignmentOfValueType+1)*AlignmentOfValueType;
|
||||
static const size_type ZeroCostInternalBufferChars =
|
||||
BOOST_STATIC_CONSTEXPR size_type ShortDataOffset = ((sizeof(short_header)-1)/AlignmentOfValueType+1)*AlignmentOfValueType;
|
||||
BOOST_STATIC_CONSTEXPR size_type ZeroCostInternalBufferChars =
|
||||
(sizeof(long_t) - ShortDataOffset)/sizeof(value_type);
|
||||
static const size_type UnalignedFinalInternalBufferChars =
|
||||
BOOST_STATIC_CONSTEXPR size_type UnalignedFinalInternalBufferChars =
|
||||
(ZeroCostInternalBufferChars > MinInternalBufferChars) ?
|
||||
ZeroCostInternalBufferChars : MinInternalBufferChars;
|
||||
|
||||
@@ -261,11 +261,11 @@ class basic_string_base
|
||||
inline allocator_type &alloc()
|
||||
{ return members_; }
|
||||
|
||||
static const size_type InternalBufferChars = (sizeof(repr_t) - ShortDataOffset)/sizeof(value_type);
|
||||
BOOST_STATIC_CONSTEXPR size_type InternalBufferChars = (sizeof(repr_t) - ShortDataOffset)/sizeof(value_type);
|
||||
|
||||
private:
|
||||
|
||||
static const size_type MinAllocation = InternalBufferChars*2;
|
||||
BOOST_STATIC_CONSTEXPR size_type MinAllocation = InternalBufferChars*2;
|
||||
|
||||
protected:
|
||||
inline bool is_short() const
|
||||
@@ -477,7 +477,7 @@ class basic_string_base
|
||||
|
||||
inline void priv_long_size(size_type sz)
|
||||
{
|
||||
static const size_type mask = size_type(-1) >> 1U;
|
||||
BOOST_STATIC_CONSTEXPR size_type mask = size_type(-1) >> 1U;
|
||||
BOOST_ASSERT( sz <= mask );
|
||||
//Make -Wconversion happy
|
||||
this->members_.plong_repr()->length = sz & mask;
|
||||
@@ -566,7 +566,7 @@ class basic_string
|
||||
BOOST_COPYABLE_AND_MOVABLE(basic_string)
|
||||
typedef dtl::basic_string_base<typename real_allocator<CharT, Allocator>::type> base_t;
|
||||
typedef typename base_t::allocator_traits_type allocator_traits_type;
|
||||
static const typename base_t::size_type InternalBufferChars = base_t::InternalBufferChars;
|
||||
BOOST_STATIC_CONSTEXPR typename base_t::size_type InternalBufferChars = base_t::InternalBufferChars;
|
||||
|
||||
protected:
|
||||
// Allocator helper class to use a char_traits as a function object.
|
||||
@@ -624,7 +624,7 @@ class basic_string
|
||||
typedef BOOST_CONTAINER_IMPDEF(const_pointer) const_iterator;
|
||||
typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
|
||||
typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
|
||||
static const size_type npos = size_type(-1);
|
||||
BOOST_STATIC_CONSTEXPR size_type npos = size_type(-1);
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
private:
|
||||
@@ -3092,13 +3092,13 @@ const typename basic_string<CharT,Traits,Allocator>::size_type
|
||||
template<class S>
|
||||
struct is_string
|
||||
{
|
||||
static const bool value = false;
|
||||
BOOST_STATIC_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
template<class C, class T, class A>
|
||||
struct is_string< basic_string<C, T, A> >
|
||||
{
|
||||
static const bool value = true;
|
||||
BOOST_STATIC_CONSTEXPR bool value = true;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -3583,8 +3583,9 @@ struct has_trivial_destructor_after_move<boost::container::basic_string<C, T, Al
|
||||
{
|
||||
typedef typename boost::container::basic_string<C, T, Allocator>::allocator_type allocator_type;
|
||||
typedef typename ::boost::container::allocator_traits<allocator_type>::pointer pointer;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value =
|
||||
::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value;
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ namespace container {
|
||||
//! to detect if a type should be constructed with suffix or prefix allocator arguments.
|
||||
template <class T>
|
||||
struct constructible_with_allocator_suffix
|
||||
{ static const bool value = false; };
|
||||
{ BOOST_STATIC_CONSTEXPR bool value = false; };
|
||||
|
||||
//! <b>Remark</b>: if a specialization constructible_with_allocator_prefix<X>::value is true, indicates that T may be constructed
|
||||
//! with allocator_arg and T::allocator_type as its first two constructor arguments.
|
||||
@@ -108,7 +108,7 @@ struct constructible_with_allocator_suffix
|
||||
//! to detect if a type should be constructed with suffix or prefix allocator arguments.
|
||||
template <class T>
|
||||
struct constructible_with_allocator_prefix
|
||||
{ static const bool value = false; };
|
||||
{ BOOST_STATIC_CONSTEXPR bool value = false; };
|
||||
|
||||
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
||||
|
||||
@@ -142,7 +142,7 @@ struct uses_allocator_imp
|
||||
static Allocator alloc; // Declared but not defined
|
||||
|
||||
public:
|
||||
static const bool value = sizeof(test<T>(alloc)) == sizeof(yes_type);
|
||||
BOOST_STATIC_CONSTEXPR bool value = sizeof(test<T>(alloc)) == sizeof(yes_type);
|
||||
};
|
||||
|
||||
} //namespace dtl {
|
||||
|
@@ -276,8 +276,8 @@ struct maybe_initial_capacity_t {};
|
||||
template <class T>
|
||||
struct vector_value_traits_base
|
||||
{
|
||||
static const bool trivial_dctr = dtl::is_trivially_destructible<T>::value;
|
||||
static const bool trivial_dctr_after_move = has_trivial_destructor_after_move<T>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool trivial_dctr = dtl::is_trivially_destructible<T>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool trivial_dctr_after_move = has_trivial_destructor_after_move<T>::value;
|
||||
};
|
||||
|
||||
template <class Allocator>
|
||||
@@ -3310,8 +3310,8 @@ struct has_trivial_destructor_after_move<boost::container::vector<T, Allocator,
|
||||
{
|
||||
typedef typename boost::container::vector<T, Allocator, Options>::allocator_type allocator_type;
|
||||
typedef typename ::boost::container::allocator_traits<allocator_type>::pointer pointer;
|
||||
static const bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value;
|
||||
BOOST_STATIC_CONSTEXPR bool value = ::boost::has_trivial_destructor_after_move<allocator_type>::value &&
|
||||
::boost::has_trivial_destructor_after_move<pointer>::value;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user