Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:58:30

0001 //
0002 // Boost.Pointer Container
0003 //
0004 //  Copyright Thorsten Ottosen 2003-2005. Use, modification and
0005 //  distribution is subject to the Boost Software License, Version
0006 //  1.0. (See accompanying file LICENSE_1_0.txt or copy at
0007 //  http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 // For more information, see http://www.boost.org/libs/ptr_container/
0010 //
0011 
0012 #ifndef BOOST_PTR_CONTAINER_PTR_DEQUE_HPP
0013 #define BOOST_PTR_CONTAINER_PTR_DEQUE_HPP
0014 
0015 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0016 # pragma once
0017 #endif
0018 
0019 #include <deque>
0020 #include <boost/ptr_container/ptr_sequence_adapter.hpp>
0021 #include <boost/ptr_container/detail/ptr_container_disable_deprecated.hpp>
0022 
0023 #if defined(BOOST_PTR_CONTAINER_DISABLE_DEPRECATED)
0024 #pragma GCC diagnostic push
0025 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
0026 #endif
0027 
0028 namespace boost
0029 {
0030 
0031     template
0032     <
0033         class T,
0034         class CloneAllocator = heap_clone_allocator,
0035         class Allocator      = std::allocator<typename ptr_container_detail::void_ptr<T>::type>
0036     >
0037     class ptr_deque : public
0038         ptr_sequence_adapter< T, std::deque<
0039             typename ptr_container_detail::void_ptr<T>::type,Allocator>,
0040                               CloneAllocator >
0041     {
0042          typedef   ptr_sequence_adapter< T, std::deque<
0043              typename ptr_container_detail::void_ptr<T>::type,Allocator>,
0044                                          CloneAllocator >
0045           base_class;
0046 
0047          typedef ptr_deque<T,CloneAllocator,Allocator> this_type;
0048 
0049     public:
0050 
0051       BOOST_PTR_CONTAINER_DEFINE_SEQEUENCE_MEMBERS( ptr_deque,
0052                                                     base_class,
0053                                                     this_type )
0054     };
0055 
0056     //////////////////////////////////////////////////////////////////////////////
0057     // clonability
0058 
0059     template< typename T, typename CA, typename A >
0060     inline ptr_deque<T,CA,A>* new_clone( const ptr_deque<T,CA,A>& r )
0061     {
0062         return r.clone().release();
0063     }
0064 
0065     /////////////////////////////////////////////////////////////////////////
0066     // swap
0067 
0068     template< typename T, typename CA, typename A >
0069     inline void swap( ptr_deque<T,CA,A>& l, ptr_deque<T,CA,A>& r )
0070     {
0071         l.swap(r);
0072     }
0073 }
0074 
0075 #if defined(BOOST_PTR_CONTAINER_DISABLE_DEPRECATED)
0076 #pragma GCC diagnostic pop
0077 #endif
0078 
0079 #endif