]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2001-2011 Joel de Guzman | |
3 | ||
4 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
6 | ==============================================================================*/ | |
7 | #if !defined(FUSION_SET_09162005_1104) | |
8 | #define FUSION_SET_09162005_1104 | |
9 | ||
10 | #include <boost/fusion/support/config.hpp> | |
11 | #include <boost/fusion/support/void.hpp> | |
12 | #include <boost/fusion/support/detail/enabler.hpp> | |
13 | #include <boost/fusion/support/is_sequence.hpp> | |
14 | #include <boost/fusion/support/sequence_base.hpp> | |
15 | #include <boost/fusion/support/category_of.hpp> | |
16 | #include <boost/fusion/support/detail/access.hpp> | |
17 | #include <boost/fusion/container/set/set_fwd.hpp> | |
18 | #include <boost/fusion/container/set/detail/begin_impl.hpp> | |
19 | #include <boost/fusion/container/set/detail/end_impl.hpp> | |
20 | #include <boost/fusion/container/set/detail/value_of_impl.hpp> | |
21 | #include <boost/fusion/container/set/detail/deref_data_impl.hpp> | |
22 | #include <boost/fusion/container/set/detail/deref_impl.hpp> | |
23 | #include <boost/fusion/container/set/detail/key_of_impl.hpp> | |
24 | #include <boost/fusion/container/set/detail/value_of_data_impl.hpp> | |
25 | #include <boost/fusion/container/vector/vector.hpp> | |
26 | #include <boost/mpl/identity.hpp> | |
27 | #include <boost/mpl/bool.hpp> | |
28 | #include <boost/core/enable_if.hpp> | |
29 | ||
30 | #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) | |
31 | #include <boost/fusion/container/set/detail/cpp03/preprocessed/set.hpp> | |
32 | #else | |
33 | #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) | |
34 | #pragma wave option(preserve: 2, line: 0, output: "preprocessed/set" FUSION_MAX_SET_SIZE_STR ".hpp") | |
35 | #endif | |
36 | ||
37 | /*============================================================================= | |
38 | Copyright (c) 2001-2011 Joel de Guzman | |
39 | ||
40 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
41 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
42 | ||
43 | This is an auto-generated file. Do not edit! | |
44 | ==============================================================================*/ | |
45 | ||
46 | #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) | |
47 | #pragma wave option(preserve: 1) | |
48 | #endif | |
49 | ||
50 | namespace boost { namespace fusion | |
51 | { | |
52 | struct fusion_sequence_tag; | |
53 | ||
54 | template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, typename T)> | |
55 | struct set : sequence_base<set<BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)> > | |
56 | { | |
57 | struct category : forward_traversal_tag, associative_tag {}; | |
58 | ||
59 | typedef set_tag fusion_tag; | |
60 | typedef fusion_sequence_tag tag; // this gets picked up by MPL | |
61 | typedef mpl::false_ is_view; | |
62 | ||
63 | typedef vector< | |
64 | BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)> | |
65 | storage_type; | |
66 | ||
67 | typedef typename storage_type::size size; | |
68 | ||
69 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
70 | set() | |
71 | : data() {} | |
72 | ||
73 | template <typename Sequence> | |
74 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
75 | set(Sequence const& rhs | |
76 | , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) | |
77 | : data(rhs) {} | |
78 | ||
79 | #include <boost/fusion/container/set/detail/cpp03/set_forward_ctor.hpp> | |
80 | ||
81 | template <typename T> | |
82 | BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
83 | set& | |
84 | operator=(T const& rhs) | |
85 | { | |
86 | data = rhs; | |
87 | return *this; | |
88 | } | |
89 | ||
90 | BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
91 | storage_type& get_data() { return data; } | |
92 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
93 | storage_type const& get_data() const { return data; } | |
94 | ||
95 | private: | |
96 | ||
97 | storage_type data; | |
98 | }; | |
99 | }} | |
100 | ||
101 | #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) | |
102 | #pragma wave option(output: null) | |
103 | #endif | |
104 | ||
105 | #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES | |
106 | ||
107 | #endif |