Ticket #4297: boost_interprocess_2.patch
File boost_interprocess_2.patch, 12.6 KB (added by , 12 years ago) |
---|
-
boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp
218 218 /*!Makes a new memory portion available for allocation*/ 219 219 void priv_add_segment(void *addr, std::size_t size); 220 220 221 enum { Alignment = boost::alignment_of<boost::detail::max_align>::value };222 enum { BlockCtrlBytes = detail::ct_rounded_size<sizeof(block_ctrl), Alignment>::value };223 enum { BlockCtrlSize = BlockCtrlBytes/Alignment };224 enum { MinBlockSize = BlockCtrlSize + Alignment };221 BOOST_STATIC_CONSTANT(std::size_t, Alignment = boost::alignment_of<boost::detail::max_align>::value); 222 BOOST_STATIC_CONSTANT(std::size_t, BlockCtrlBytes = detail::ct_rounded_size<sizeof(block_ctrl), Alignment>::value); 223 BOOST_STATIC_CONSTANT(std::size_t, BlockCtrlSize = BlockCtrlBytes/Alignment); 224 BOOST_STATIC_CONSTANT(std::size_t, MinBlockSize = BlockCtrlSize + Alignment); 225 225 226 226 public: 227 enum { PayloadPerAllocation = BlockCtrlBytes };227 BOOST_STATIC_CONSTANT(std::size_t, PayloadPerAllocation = BlockCtrlBytes); 228 228 }; 229 229 230 230 template<class MutexFamily, class VoidPointer> -
boost/interprocess/indexes/iset_index.hpp
138 138 struct is_intrusive_index 139 139 <boost::interprocess::iset_index<MapConfig> > 140 140 { 141 enum{ value = true };141 BOOST_STATIC_CONSTANT(bool, value = true); 142 142 }; 143 143 /// @endcond 144 144 -
boost/interprocess/indexes/unordered_map_index.hpp
102 102 struct is_node_index 103 103 <boost::interprocess::unordered_map_index<MapConfig> > 104 104 { 105 enum { value = true };105 BOOST_STATIC_CONSTANT(bool, value = true); 106 106 }; 107 107 /// @endcond 108 108 -
boost/interprocess/indexes/iunordered_set_index.hpp
155 155 typedef typename index_aux:: 156 156 segment_manager_base segment_manager_base; 157 157 158 enum { InitBufferSize = 64};159 160 158 static bucket_ptr create_buckets(allocator_type &alloc, std::size_t num) 161 159 { 162 160 num = index_type::suggested_upper_bucket_count(num); … … 356 354 struct is_intrusive_index 357 355 <boost::interprocess::iunordered_set_index<MapConfig> > 358 356 { 359 enum{ value = true };357 BOOST_STATIC_CONSTANT(bool, value = true); 360 358 }; 361 359 /// @endcond 362 360 -
boost/interprocess/indexes/map_index.hpp
89 89 struct is_node_index 90 90 <boost::interprocess::map_index<MapConfig> > 91 91 { 92 enum { value = true };92 BOOST_STATIC_CONSTANT(bool, value = true); 93 93 }; 94 94 /// @endcond 95 95 -
boost/interprocess/offset_ptr.hpp
371 371 template <class T> 372 372 struct has_trivial_constructor< boost::interprocess::offset_ptr<T> > 373 373 { 374 enum { value = true };374 BOOST_STATIC_CONSTANT(bool, value = true); 375 375 }; 376 376 377 377 ///has_trivial_destructor<> == true_type specialization for optimizations 378 378 template <class T> 379 379 struct has_trivial_destructor< boost::interprocess::offset_ptr<T> > 380 380 { 381 enum { value = true };381 BOOST_STATIC_CONSTANT(bool, value = true); 382 382 }; 383 383 384 384 //#if !defined(_MSC_VER) || (_MSC_VER >= 1400) -
boost/interprocess/detail/segment_manager_helper.hpp
271 271 272 272 intrusive_value_type_impl(){} 273 273 274 enum { BlockHdrAlignment = detail::alignment_of<block_header>::value };274 BOOST_STATIC_CONSTANT(std::size_t, BlockHdrAlignment = detail::alignment_of<block_header>::value); 275 275 276 276 block_header *get_block_header() const 277 277 { -
boost/interprocess/detail/move.hpp
69 69 static false_t dispatch(...); 70 70 static T trigger(); 71 71 public: 72 enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) };72 BOOST_STATIC_CONSTANT(bool, value = sizeof(dispatch(trigger())) == sizeof(true_t)); 73 73 }; 74 74 75 75 } //namespace move_detail { -
boost/interprocess/detail/type_traits.hpp
42 42 template <unsigned A, unsigned S> 43 43 struct alignment_logic 44 44 { 45 enum{ value = A < S ? A : S };45 BOOST_STATIC_CONSTANT(std::size_t, value = A < S ? A : S); 46 46 }; 47 47 48 48 template< typename T > 49 49 struct alignment_of 50 50 { 51 enum{ value =alignment_logic51 BOOST_STATIC_CONSTANT(std::size_t, value = (alignment_logic 52 52 < sizeof(alignment_of_hack<T>) - sizeof(T) 53 , sizeof(T)>::value };53 , sizeof(T)>::value)); 54 54 }; 55 55 56 56 //This is not standard, but should work with all compilers … … 84 84 template<class T> 85 85 struct is_reference 86 86 { 87 enum { value = false };87 BOOST_STATIC_CONSTANT(bool, value = false); 88 88 }; 89 89 90 90 template<class T> 91 91 struct is_reference<T&> 92 92 { 93 enum { value = true };93 BOOST_STATIC_CONSTANT(bool, value = true); 94 94 }; 95 95 96 96 template<class T> 97 97 struct is_pointer 98 98 { 99 enum { value = false };99 BOOST_STATIC_CONSTANT(bool, value = false); 100 100 }; 101 101 102 102 template<class T> 103 103 struct is_pointer<T*> 104 104 { 105 enum { value = true };105 BOOST_STATIC_CONSTANT(bool, value = true); 106 106 }; 107 107 108 108 template <typename T> -
boost/interprocess/detail/utilities.hpp
96 96 template <std::size_t OrigSize, std::size_t RoundTo> 97 97 struct ct_rounded_size 98 98 { 99 enum { value = ((OrigSize-1)/RoundTo+1)*RoundTo };99 BOOST_STATIC_CONSTANT(std::size_t, value = ((OrigSize-1)/RoundTo+1)*RoundTo); 100 100 }; 101 101 102 102 // Gennaro Prota wrote this. Thanks! 103 103 template <int p, int n = 4> 104 104 struct ct_max_pow2_less 105 105 { 106 enum { c = 2*n < p };106 BOOST_STATIC_CONSTANT(bool, c = 2*n < p); 107 107 108 static const std::size_tvalue =109 c ? (ct_max_pow2_less< c*p, 2*c*n>::value) : n ;108 BOOST_STATIC_CONSTANT(std::size_t, value = 109 c ? (ct_max_pow2_less< c*p, 2*c*n>::value) : n); 110 110 }; 111 111 112 112 template <> 113 113 struct ct_max_pow2_less<0, 0> 114 114 { 115 static const std::size_t value = 0;115 BOOST_STATIC_CONSTANT(std::size_t, value = 0); 116 116 }; 117 117 118 118 } //namespace detail { … … 123 123 template <class Index> 124 124 struct is_node_index 125 125 { 126 enum { value = false };126 BOOST_STATIC_CONSTANT(bool, value = false); 127 127 }; 128 128 129 129 //!Trait class to detect if an index is an intrusive … … 133 133 template <class Index> 134 134 struct is_intrusive_index 135 135 { 136 enum { value = false };136 BOOST_STATIC_CONSTANT(bool, value = false); 137 137 }; 138 138 139 139 template <typename T> T* -
boost/interprocess/detail/mpl.hpp
71 71 static false_t dispatch(...); 72 72 static T trigger(); 73 73 public: 74 enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) };74 BOOST_STATIC_CONSTANT(bool, value = sizeof(dispatch(trigger())) == sizeof(true_t)); 75 75 }; 76 76 77 77 template< -
boost/interprocess/allocators/detail/allocator_common.hpp
546 546 typedef typename base_t::value_type value_type; 547 547 548 548 public: 549 enum { DEFAULT_MAX_CACHED_NODES = 64 };549 BOOST_STATIC_CONSTANT(std::size_t, DEFAULT_MAX_CACHED_NODES = 64); 550 550 551 551 cached_allocator_impl(segment_manager *segment_mngr, std::size_t max_cached_nodes) 552 552 : m_cache(segment_mngr, max_cached_nodes) -
boost/interprocess/allocators/allocator.hpp
293 293 struct has_trivial_destructor 294 294 <boost::interprocess::allocator <T, SegmentManager> > 295 295 { 296 enum { value = true };296 BOOST_STATIC_CONSTANT(bool, value = true); 297 297 }; 298 298 /// @endcond 299 299 -
boost/interprocess/containers/container/detail/type_traits.hpp
42 42 template <unsigned A, unsigned S> 43 43 struct alignment_logic 44 44 { 45 enum{ value = A < S ? A : S };45 BOOST_STATIC_CONSTANT(std::size_t, value = A < S ? A : S); 46 46 }; 47 47 48 48 template< typename T > 49 49 struct alignment_of 50 50 { 51 enum{ value =alignment_logic51 BOOST_STATIC_CONSTANT(std::size_t, value = (alignment_logic 52 52 < sizeof(alignment_of_hack<T>) - sizeof(T) 53 , sizeof(T)>::value };53 , sizeof(T)>::value)); 54 54 }; 55 55 56 56 //This is not standard, but should work with all compilers … … 84 84 template<class T> 85 85 struct is_reference 86 86 { 87 enum { value = false };87 BOOST_STATIC_CONSTANT(bool, value = false); 88 88 }; 89 89 90 90 template<class T> 91 91 struct is_reference<T&> 92 92 { 93 enum { value = true };93 BOOST_STATIC_CONSTANT(bool, value = true); 94 94 }; 95 95 96 96 template<class T> 97 97 struct is_pointer 98 98 { 99 enum { value = false };99 BOOST_STATIC_CONSTANT(bool, value = false); 100 100 }; 101 101 102 102 template<class T> 103 103 struct is_pointer<T*> 104 104 { 105 enum { value = true };105 BOOST_STATIC_CONSTANT(bool, value = true); 106 106 }; 107 107 108 108 template <typename T> -
boost/interprocess/containers/container/detail/utilities.hpp
93 93 template <std::size_t OrigSize, std::size_t RoundTo> 94 94 struct ct_rounded_size 95 95 { 96 enum { value = ((OrigSize-1)/RoundTo+1)*RoundTo };96 BOOST_STATIC_CONSTANT(std::size_t, value = ((OrigSize-1)/RoundTo+1)*RoundTo); 97 97 }; 98 98 99 99 template<class T> -
boost/interprocess/containers/container/detail/mpl.hpp
71 71 static false_t dispatch(...); 72 72 static T trigger(); 73 73 public: 74 enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) };74 BOOST_STATIC_CONSTANT(bool, value = sizeof(dispatch(trigger())) == sizeof(true_t)); 75 75 }; 76 76 77 77 template< -
boost/interprocess/containers/container/deque.hpp
455 455 this->priv_deallocate_node(*n); 456 456 } 457 457 458 enum { InitialMapSize = 8 };458 BOOST_STATIC_CONSTANT(std::size_t, InitialMapSize = 8); 459 459 460 460 protected: 461 461 struct members_holder … … 1509 1509 template <class T, class A> 1510 1510 struct has_trivial_destructor_after_move<boost::container::deque<T, A> > 1511 1511 { 1512 enum { value = has_trivial_destructor<A>::value };1512 BOOST_STATIC_CONSTANT(bool, value = has_trivial_destructor<A>::value); 1513 1513 }; 1514 1514 */ 1515 1515 }