1//
2// Boost.Pointer Container
3//
4// Copyright Thorsten Ottosen 2003-2005. Use, modification and
5// distribution is subject to the Boost Software License, Version
6// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
9// For more information, see http://www.boost.org/libs/ptr_container/
10//
11
12#ifndef BOOST_PTR_CONTAINER_PTR_DEQUE_HPP
13#define BOOST_PTR_CONTAINER_PTR_DEQUE_HPP
14
15#if defined(_MSC_VER) && (_MSC_VER >= 1200)
16# pragma once
17#endif
18
19#include <deque>
20#include <boost/ptr_container/ptr_sequence_adapter.hpp>
21#include <boost/ptr_container/detail/ptr_container_disable_deprecated.hpp>
22
23#if defined(BOOST_PTR_CONTAINER_DISABLE_DEPRECATED)
24#pragma GCC diagnostic push
25#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
26#endif
27
28namespace boost
29{
30
31 template
32 <
33 class T,
34 class CloneAllocator = heap_clone_allocator,
35 class Allocator = std::allocator<typename ptr_container_detail::void_ptr<T>::type>
36 >
37 class ptr_deque : public
38 ptr_sequence_adapter< T, std::deque<
39 typename ptr_container_detail::void_ptr<T>::type,Allocator>,
40 CloneAllocator >
41 {
42 typedef ptr_sequence_adapter< T, std::deque<
43 typename ptr_container_detail::void_ptr<T>::type,Allocator>,
44 CloneAllocator >
45 base_class;
46
47 typedef ptr_deque<T,CloneAllocator,Allocator> this_type;
48
49 public:
50
51 BOOST_PTR_CONTAINER_DEFINE_SEQEUENCE_MEMBERS( ptr_deque,
52 base_class,
53 this_type )
54 };
55
56 //////////////////////////////////////////////////////////////////////////////
57 // clonability
58
59 template< typename T, typename CA, typename A >
60 inline ptr_deque<T,CA,A>* new_clone( const ptr_deque<T,CA,A>& r )
61 {
62 return r.clone().release();
63 }
64
65 /////////////////////////////////////////////////////////////////////////
66 // swap
67
68 template< typename T, typename CA, typename A >
69 inline void swap( ptr_deque<T,CA,A>& l, ptr_deque<T,CA,A>& r )
70 {
71 l.swap(r);
72 }
73}
74
75#if defined(BOOST_PTR_CONTAINER_DISABLE_DEPRECATED)
76#pragma GCC diagnostic pop
77#endif
78
79#endif
80

source code of boost/libs/ptr_container/include/boost/ptr_container/ptr_deque.hpp