Index: boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp =================================================================== --- boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp (révision 62430) +++ boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp (copie de travail) @@ -218,13 +218,13 @@ /*!Makes a new memory portion available for allocation*/ void priv_add_segment(void *addr, std::size_t size); - enum { Alignment = boost::alignment_of::value }; - enum { BlockCtrlBytes = detail::ct_rounded_size::value }; - enum { BlockCtrlSize = BlockCtrlBytes/Alignment }; - enum { MinBlockSize = BlockCtrlSize + Alignment }; + BOOST_STATIC_CONSTANT(std::size_t, Alignment = boost::alignment_of::value); + BOOST_STATIC_CONSTANT(std::size_t, BlockCtrlBytes = detail::ct_rounded_size::value); + BOOST_STATIC_CONSTANT(std::size_t, BlockCtrlSize = BlockCtrlBytes/Alignment); + BOOST_STATIC_CONSTANT(std::size_t, MinBlockSize = BlockCtrlSize + Alignment); public: - enum { PayloadPerAllocation = BlockCtrlBytes }; + BOOST_STATIC_CONSTANT(std::size_t, PayloadPerAllocation = BlockCtrlBytes); }; template Index: boost/interprocess/indexes/iset_index.hpp =================================================================== --- boost/interprocess/indexes/iset_index.hpp (révision 62430) +++ boost/interprocess/indexes/iset_index.hpp (copie de travail) @@ -138,7 +138,7 @@ struct is_intrusive_index > { - enum{ value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; /// @endcond Index: boost/interprocess/indexes/unordered_map_index.hpp =================================================================== --- boost/interprocess/indexes/unordered_map_index.hpp (révision 62430) +++ boost/interprocess/indexes/unordered_map_index.hpp (copie de travail) @@ -102,7 +102,7 @@ struct is_node_index > { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; /// @endcond Index: boost/interprocess/indexes/iunordered_set_index.hpp =================================================================== --- boost/interprocess/indexes/iunordered_set_index.hpp (révision 62430) +++ boost/interprocess/indexes/iunordered_set_index.hpp (copie de travail) @@ -155,8 +155,6 @@ typedef typename index_aux:: segment_manager_base segment_manager_base; - enum { InitBufferSize = 64}; - static bucket_ptr create_buckets(allocator_type &alloc, std::size_t num) { num = index_type::suggested_upper_bucket_count(num); @@ -356,7 +354,7 @@ struct is_intrusive_index > { - enum{ value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; /// @endcond Index: boost/interprocess/indexes/map_index.hpp =================================================================== --- boost/interprocess/indexes/map_index.hpp (révision 62430) +++ boost/interprocess/indexes/map_index.hpp (copie de travail) @@ -89,7 +89,7 @@ struct is_node_index > { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; /// @endcond Index: boost/interprocess/offset_ptr.hpp =================================================================== --- boost/interprocess/offset_ptr.hpp (révision 62430) +++ boost/interprocess/offset_ptr.hpp (copie de travail) @@ -371,14 +371,14 @@ template struct has_trivial_constructor< boost::interprocess::offset_ptr > { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; ///has_trivial_destructor<> == true_type specialization for optimizations template struct has_trivial_destructor< boost::interprocess::offset_ptr > { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; //#if !defined(_MSC_VER) || (_MSC_VER >= 1400) Index: boost/interprocess/detail/segment_manager_helper.hpp =================================================================== --- boost/interprocess/detail/segment_manager_helper.hpp (révision 62430) +++ boost/interprocess/detail/segment_manager_helper.hpp (copie de travail) @@ -271,7 +271,7 @@ intrusive_value_type_impl(){} - enum { BlockHdrAlignment = detail::alignment_of::value }; + BOOST_STATIC_CONSTANT(std::size_t, BlockHdrAlignment = detail::alignment_of::value); block_header *get_block_header() const { Index: boost/interprocess/detail/move.hpp =================================================================== --- boost/interprocess/detail/move.hpp (révision 62430) +++ boost/interprocess/detail/move.hpp (copie de travail) @@ -69,7 +69,7 @@ static false_t dispatch(...); static T trigger(); public: - enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) }; + BOOST_STATIC_CONSTANT(bool, value = sizeof(dispatch(trigger())) == sizeof(true_t)); }; } //namespace move_detail { Index: boost/interprocess/detail/type_traits.hpp =================================================================== --- boost/interprocess/detail/type_traits.hpp (révision 62430) +++ boost/interprocess/detail/type_traits.hpp (copie de travail) @@ -42,15 +42,15 @@ template struct alignment_logic { - enum{ value = A < S ? A : S }; + BOOST_STATIC_CONSTANT(std::size_t, value = A < S ? A : S); }; template< typename T > struct alignment_of { - enum{ value = alignment_logic + BOOST_STATIC_CONSTANT(std::size_t, value = (alignment_logic < sizeof(alignment_of_hack) - sizeof(T) - , sizeof(T)>::value }; + , sizeof(T)>::value)); }; //This is not standard, but should work with all compilers @@ -84,25 +84,25 @@ template struct is_reference { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_reference { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_pointer { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_pointer { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template Index: boost/interprocess/detail/utilities.hpp =================================================================== --- boost/interprocess/detail/utilities.hpp (révision 62430) +++ boost/interprocess/detail/utilities.hpp (copie de travail) @@ -96,23 +96,23 @@ template struct ct_rounded_size { - enum { value = ((OrigSize-1)/RoundTo+1)*RoundTo }; + BOOST_STATIC_CONSTANT(std::size_t, value = ((OrigSize-1)/RoundTo+1)*RoundTo); }; // Gennaro Prota wrote this. Thanks! template struct ct_max_pow2_less { - enum { c = 2*n < p }; + BOOST_STATIC_CONSTANT(bool, c = 2*n < p); - static const std::size_t value = - c ? (ct_max_pow2_less< c*p, 2*c*n>::value) : n; + BOOST_STATIC_CONSTANT(std::size_t, value = + c ? (ct_max_pow2_less< c*p, 2*c*n>::value) : n); }; template <> struct ct_max_pow2_less<0, 0> { - static const std::size_t value = 0; + BOOST_STATIC_CONSTANT(std::size_t, value = 0); }; } //namespace detail { @@ -123,7 +123,7 @@ template struct is_node_index { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; //!Trait class to detect if an index is an intrusive @@ -133,7 +133,7 @@ template struct is_intrusive_index { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template T* Index: boost/interprocess/detail/mpl.hpp =================================================================== --- boost/interprocess/detail/mpl.hpp (révision 62430) +++ boost/interprocess/detail/mpl.hpp (copie de travail) @@ -71,7 +71,7 @@ static false_t dispatch(...); static T trigger(); public: - enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) }; + BOOST_STATIC_CONSTANT(bool, value = sizeof(dispatch(trigger())) == sizeof(true_t)); }; template< Index: boost/interprocess/allocators/detail/allocator_common.hpp =================================================================== --- boost/interprocess/allocators/detail/allocator_common.hpp (révision 62430) +++ boost/interprocess/allocators/detail/allocator_common.hpp (copie de travail) @@ -546,7 +546,7 @@ typedef typename base_t::value_type value_type; public: - enum { DEFAULT_MAX_CACHED_NODES = 64 }; + BOOST_STATIC_CONSTANT(std::size_t, DEFAULT_MAX_CACHED_NODES = 64); cached_allocator_impl(segment_manager *segment_mngr, std::size_t max_cached_nodes) : m_cache(segment_mngr, max_cached_nodes) Index: boost/interprocess/allocators/allocator.hpp =================================================================== --- boost/interprocess/allocators/allocator.hpp (révision 62430) +++ boost/interprocess/allocators/allocator.hpp (copie de travail) @@ -293,7 +293,7 @@ struct has_trivial_destructor > { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; /// @endcond Index: boost/interprocess/containers/container/detail/type_traits.hpp =================================================================== --- boost/interprocess/containers/container/detail/type_traits.hpp (révision 62430) +++ boost/interprocess/containers/container/detail/type_traits.hpp (copie de travail) @@ -42,15 +42,15 @@ template struct alignment_logic { - enum{ value = A < S ? A : S }; + BOOST_STATIC_CONSTANT(std::size_t, value = A < S ? A : S); }; template< typename T > struct alignment_of { - enum{ value = alignment_logic + BOOST_STATIC_CONSTANT(std::size_t, value = (alignment_logic < sizeof(alignment_of_hack) - sizeof(T) - , sizeof(T)>::value }; + , sizeof(T)>::value)); }; //This is not standard, but should work with all compilers @@ -84,25 +84,25 @@ template struct is_reference { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_reference { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_pointer { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_pointer { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template Index: boost/interprocess/containers/container/detail/utilities.hpp =================================================================== --- boost/interprocess/containers/container/detail/utilities.hpp (révision 62430) +++ boost/interprocess/containers/container/detail/utilities.hpp (copie de travail) @@ -93,7 +93,7 @@ template struct ct_rounded_size { - enum { value = ((OrigSize-1)/RoundTo+1)*RoundTo }; + BOOST_STATIC_CONSTANT(std::size_t, value = ((OrigSize-1)/RoundTo+1)*RoundTo); }; template Index: boost/interprocess/containers/container/detail/mpl.hpp =================================================================== --- boost/interprocess/containers/container/detail/mpl.hpp (révision 62430) +++ boost/interprocess/containers/container/detail/mpl.hpp (copie de travail) @@ -71,7 +71,7 @@ static false_t dispatch(...); static T trigger(); public: - enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) }; + BOOST_STATIC_CONSTANT(bool, value = sizeof(dispatch(trigger())) == sizeof(true_t)); }; template< Index: boost/interprocess/containers/container/deque.hpp =================================================================== --- boost/interprocess/containers/container/deque.hpp (révision 62430) +++ boost/interprocess/containers/container/deque.hpp (copie de travail) @@ -455,7 +455,7 @@ this->priv_deallocate_node(*n); } - enum { InitialMapSize = 8 }; + BOOST_STATIC_CONSTANT(std::size_t, InitialMapSize = 8); protected: struct members_holder @@ -1509,7 +1509,7 @@ template struct has_trivial_destructor_after_move > { - enum { value = has_trivial_destructor::value }; + BOOST_STATIC_CONSTANT(bool, value = has_trivial_destructor::value); }; */ }