Chris@16
|
1 //////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
2 //
|
Chris@101
|
3 // (C) Copyright Ion Gaztanaga 2011-2013. Distributed under the Boost
|
Chris@16
|
4 // Software License, Version 1.0. (See accompanying file
|
Chris@16
|
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6 //
|
Chris@16
|
7 // See http://www.boost.org/libs/container for documentation.
|
Chris@16
|
8 //
|
Chris@16
|
9 //////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
10
|
Chris@16
|
11 #ifndef BOOST_CONTAINER_ALLOCATOR_SCOPED_ALLOCATOR_FWD_HPP
|
Chris@16
|
12 #define BOOST_CONTAINER_ALLOCATOR_SCOPED_ALLOCATOR_FWD_HPP
|
Chris@16
|
13
|
Chris@101
|
14 //! \file
|
Chris@101
|
15 //! This header file forward declares boost::container::scoped_allocator_adaptor
|
Chris@101
|
16 //! and defines the following types:
|
Chris@101
|
17
|
Chris@101
|
18 #ifndef BOOST_CONFIG_HPP
|
Chris@101
|
19 # include <boost/config.hpp>
|
Chris@101
|
20 #endif
|
Chris@101
|
21
|
Chris@101
|
22 #if defined(BOOST_HAS_PRAGMA_ONCE)
|
Chris@16
|
23 # pragma once
|
Chris@16
|
24 #endif
|
Chris@16
|
25
|
Chris@16
|
26 #include <boost/container/detail/config_begin.hpp>
|
Chris@16
|
27 #include <boost/container/detail/workaround.hpp>
|
Chris@101
|
28 #include <boost/container/detail/std_fwd.hpp>
|
Chris@16
|
29
|
Chris@16
|
30 #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
Chris@101
|
31 #include <boost/move/detail/fwd_macros.hpp>
|
Chris@16
|
32 #endif
|
Chris@16
|
33
|
Chris@16
|
34 namespace boost { namespace container {
|
Chris@16
|
35
|
Chris@101
|
36 #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
Chris@16
|
37
|
Chris@16
|
38 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
Chris@16
|
39
|
Chris@16
|
40 #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST)
|
Chris@16
|
41
|
Chris@101
|
42 template <typename OuterAlloc, typename ...InnerAllocs>
|
Chris@101
|
43 class scoped_allocator_adaptor;
|
Chris@16
|
44
|
Chris@16
|
45 #else // #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST)
|
Chris@16
|
46
|
Chris@101
|
47 template <typename ...InnerAllocs>
|
Chris@101
|
48 class scoped_allocator_adaptor;
|
Chris@16
|
49
|
Chris@101
|
50 template <typename OuterAlloc, typename ...InnerAllocs>
|
Chris@101
|
51 class scoped_allocator_adaptor<OuterAlloc, InnerAllocs...>;
|
Chris@16
|
52
|
Chris@16
|
53 #endif // #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST)
|
Chris@16
|
54
|
Chris@16
|
55 #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
Chris@16
|
56
|
Chris@101
|
57 template <typename OuterAlloc, BOOST_MOVE_CLASSDFLT9>
|
Chris@101
|
58 class scoped_allocator_adaptor;
|
Chris@16
|
59
|
Chris@16
|
60 #endif
|
Chris@16
|
61
|
Chris@101
|
62 template <int Dummy = 0>
|
Chris@101
|
63 struct std_allocator_arg_holder
|
Chris@101
|
64 {
|
Chris@101
|
65 static ::std::allocator_arg_t *dummy;
|
Chris@101
|
66 };
|
Chris@101
|
67
|
Chris@101
|
68 template <int Dummy>
|
Chris@101
|
69 ::std::allocator_arg_t *std_allocator_arg_holder<Dummy>::dummy;
|
Chris@101
|
70
|
Chris@101
|
71 #else //BOOST_CONTAINER_DOXYGEN_INVOKED
|
Chris@101
|
72
|
Chris@101
|
73 #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
Chris@16
|
74
|
Chris@16
|
75 //! The allocator_arg_t struct is an empty structure type used as a unique type to
|
Chris@16
|
76 //! disambiguate constructor and function overloading. Specifically, several types
|
Chris@16
|
77 //! have constructors with allocator_arg_t as the first argument, immediately followed
|
Chris@101
|
78 //! by an argument of a type that satisfies Allocator requirements
|
Chris@101
|
79 typedef const std::allocator_arg_t & allocator_arg_t;
|
Chris@16
|
80
|
Chris@16
|
81 //! A instance of type allocator_arg_t
|
Chris@16
|
82 //!
|
Chris@101
|
83 static allocator_arg_t allocator_arg = BOOST_CONTAINER_DOC1ST(unspecified, *std_allocator_arg_holder<>::dummy);
|
Chris@16
|
84
|
Chris@16
|
85 template <class T>
|
Chris@16
|
86 struct constructible_with_allocator_suffix;
|
Chris@16
|
87
|
Chris@16
|
88 template <class T>
|
Chris@16
|
89 struct constructible_with_allocator_prefix;
|
Chris@16
|
90
|
Chris@101
|
91 template <typename T, typename Allocator>
|
Chris@16
|
92 struct uses_allocator;
|
Chris@16
|
93
|
Chris@16
|
94 }} // namespace boost { namespace container {
|
Chris@16
|
95
|
Chris@16
|
96 #include <boost/container/detail/config_end.hpp>
|
Chris@16
|
97
|
Chris@16
|
98 #endif // BOOST_CONTAINER_ALLOCATOR_SCOPED_ALLOCATOR_FWD_HPP
|