/usr/include/boost/container/detail
NameSizeModeActions
adaptive_node_pool.hpp55690644editdlrm
adaptive_node_pool_impl.hpp540880644editdlrm
addressof.hpp10630644editdlrm
advanced_insert_int.hpp176680644editdlrm
algorithm.hpp38800644editdlrm
allocation_type.hpp20170644editdlrm
allocator_version_traits.hpp56320644editdlrm
alloc_helpers.hpp18670644editdlrm
alloc_lib.h117420644editdlrm
auto_link.hpp16570644editdlrm
block_list.hpp41990644editdlrm
block_slist.hpp45030644editdlrm
compare_functors.hpp39920644editdlrm
config_begin.hpp36370644editdlrm
config_end.hpp4800644editdlrm
construct_in_place.hpp29520644editdlrm
container_or_allocator_rebind.hpp17430644editdlrm
container_rebind.hpp66100644editdlrm
copy_move_algo.hpp385310644editdlrm
destroyers.hpp93380644editdlrm
dispatch_uses_allocator.hpp197330644editdlrm
dlmalloc.hpp34440644editdlrm
flat_tree.hpp616630644editdlrm
function_detector.hpp35580644editdlrm
is_container.hpp22130644editdlrm
is_contiguous_container.hpp17120644editdlrm
is_sorted.hpp14650644editdlrm
iterator.hpp25900644editdlrm
iterators.hpp298820644editdlrm
iterator_to_raw_pointer.hpp9710644editdlrm
math_functions.hpp38720644editdlrm
minimal_char_traits_header.hpp10570644editdlrm
min_max.hpp9970644editdlrm
mpl.hpp38340644editdlrm
multiallocation_chain.hpp103170644editdlrm
mutex.hpp86650644editdlrm
next_capacity.hpp21400644editdlrm
node_alloc_holder.hpp176510644editdlrm
node_pool.hpp48080644editdlrm
node_pool_impl.hpp131710644editdlrm
pair.hpp212810644editdlrm
pair_key_mapped_of_value.hpp14660644editdlrm
placement_new.hpp9140644editdlrm
pool_common.hpp16060644editdlrm
pool_common_alloc.hpp27300644editdlrm
pool_resource.hpp77440644editdlrm
singleton.hpp44650644editdlrm
std_fwd.hpp14500644editdlrm
thread_mutex.hpp44490644editdlrm
transform_iterator.hpp51030644editdlrm
tree.hpp570380644editdlrm
type_traits.hpp27140644editdlrm
value_functors.hpp11180644editdlrm
value_init.hpp11350644editdlrm
variadic_templates_tools.hpp49590644editdlrm
version_type.hpp24160644editdlrm
workaround.hpp45010644editdlrm
Edit: /usr/include/boost/container/detail/allocator_version_traits.hpp (5632B)
////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2012-2013. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/container for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP #define BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP #ifndef BOOST_CONFIG_HPP # include #endif #if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif #include #include #include //allocator_traits #include #include //multiallocation_chain #include //version_type #include //allocation_type #include //integral_constant #include //pointer_traits #include //BOOST_TRY namespace boost { namespace container { namespace dtl { template::value> struct allocator_version_traits { typedef ::boost::container::dtl::integral_constant alloc_version; typedef typename Allocator::multiallocation_chain multiallocation_chain; typedef typename boost::container::allocator_traits::pointer pointer; typedef typename boost::container::allocator_traits::size_type size_type; //Node allocation interface static pointer allocate_one(Allocator &a) { return a.allocate_one(); } static void deallocate_one(Allocator &a, const pointer &p) { a.deallocate_one(p); } static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m) { return a.allocate_individual(n, m); } static void deallocate_individual(Allocator &a, multiallocation_chain &holder) { a.deallocate_individual(holder); } static pointer allocation_command(Allocator &a, allocation_type command, size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse) { return a.allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); } }; template struct allocator_version_traits { typedef ::boost::container::dtl::integral_constant alloc_version; typedef typename boost::container::allocator_traits::pointer pointer; typedef typename boost::container::allocator_traits::size_type size_type; typedef typename boost::container::allocator_traits::value_type value_type; typedef typename boost::intrusive::pointer_traits:: template rebind_pointer::type void_ptr; typedef dtl::basic_multiallocation_chain multialloc_cached_counted; typedef boost::container::dtl:: transform_multiallocation_chain < multialloc_cached_counted, value_type> multiallocation_chain; //Node allocation interface static pointer allocate_one(Allocator &a) { return a.allocate(1); } static void deallocate_one(Allocator &a, const pointer &p) { a.deallocate(p, 1); } static void deallocate_individual(Allocator &a, multiallocation_chain &holder) { size_type n = holder.size(); typename multiallocation_chain::iterator it = holder.begin(); while(n){ --n; pointer p = boost::intrusive::pointer_traits::pointer_to(*it); ++it; a.deallocate(p, 1); } } struct allocate_individual_rollback { allocate_individual_rollback(Allocator &a, multiallocation_chain &chain) : mr_a(a), mp_chain(&chain) {} ~allocate_individual_rollback() { if(mp_chain) allocator_version_traits::deallocate_individual(mr_a, *mp_chain); } void release() { mp_chain = 0; } Allocator &mr_a; multiallocation_chain * mp_chain; }; static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m) { allocate_individual_rollback rollback(a, m); while(n--){ m.push_front(a.allocate(1)); } rollback.release(); } static pointer allocation_command(Allocator &a, allocation_type command, size_type, size_type &prefer_in_recvd_out_size, pointer &reuse) { pointer ret = pointer(); if(BOOST_UNLIKELY(!(command & allocate_new) && !(command & nothrow_allocation))){ throw_logic_error("version 1 allocator without allocate_new flag"); } else{ BOOST_TRY{ ret = a.allocate(prefer_in_recvd_out_size); } BOOST_CATCH(...){ if(!(command & nothrow_allocation)){ BOOST_RETHROW } } BOOST_CATCH_END reuse = pointer(); } return ret; } }; } //namespace dtl { } //namespace container { } //namespace boost { #include #endif // ! defined(BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP)