/usr/include/boost/ptr_container
NameSizeModeActions
detail/-0755rm
clone_allocator.hpp21520644editdlrm
exception.hpp13260644editdlrm
indirect_fun.hpp36930644editdlrm
nullable.hpp22280644editdlrm
ptr_array.hpp84470644editdlrm
ptr_circular_buffer.hpp194790644editdlrm
ptr_container.hpp9580644editdlrm
ptr_deque.hpp23270644editdlrm
ptr_inserter.hpp80220644editdlrm
ptr_list.hpp36720644editdlrm
ptr_map.hpp53300644editdlrm
ptr_map_adapter.hpp372860644editdlrm
ptr_sequence_adapter.hpp268310644editdlrm
ptr_set.hpp53750644editdlrm
ptr_set_adapter.hpp295680644editdlrm
ptr_unordered_map.hpp86180644editdlrm
ptr_unordered_set.hpp88310644editdlrm
ptr_vector.hpp29550644editdlrm
serialize_ptr_array.hpp13990644editdlrm
serialize_ptr_circular_buffer.hpp14080644editdlrm
serialize_ptr_container.hpp8060644editdlrm
serialize_ptr_deque.hpp7290644editdlrm
serialize_ptr_list.hpp7250644editdlrm
serialize_ptr_map.hpp10120644editdlrm
serialize_ptr_set.hpp9320644editdlrm
serialize_ptr_unordered_map.hpp12270644editdlrm
serialize_ptr_unordered_set.hpp11950644editdlrm
serialize_ptr_vector.hpp12170644editdlrm
Edit: /usr/include/boost/ptr_container/clone_allocator.hpp (2152B)
// // Boost.Pointer Container // // Copyright Thorsten Ottosen 2003-2005. Use, modification and // distribution is subject to 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) // // For more information, see http://www.boost.org/libs/ptr_container/ // #ifndef BOOST_PTR_CONTAINER_CLONE_ALLOCATOR_HPP #define BOOST_PTR_CONTAINER_CLONE_ALLOCATOR_HPP #include #include #include namespace boost { ///////////////////////////////////////////////////////////////////////// // Clonable concept ///////////////////////////////////////////////////////////////////////// template< class T > inline T* new_clone( const T& r ) { // // @remark: if you get a compile-error here, // it is most likely because you did not // define new_clone( const T& ) in the namespace // of T. // T* res = new T( r ); BOOST_ASSERT( typeid(r) == typeid(*res) && "Default new_clone() sliced object!" ); return res; } template< class T > inline void delete_clone( const T* r ) { checked_delete( r ); } ///////////////////////////////////////////////////////////////////////// // CloneAllocator concept ///////////////////////////////////////////////////////////////////////// struct heap_clone_allocator { template< class U > static U* allocate_clone( const U& r ) { return new_clone( r ); } template< class U > static void deallocate_clone( const U* r ) { delete_clone( r ); } }; struct view_clone_allocator { template< class U > static U* allocate_clone( const U& r ) { return const_cast(&r); } template< class U > static void deallocate_clone( const U* /*r*/ ) { // do nothing } }; } // namespace 'boost' #endif