diff --git a/doc/extension.qbk b/doc/extension.qbk index cbb61ce5..21ebd849 100644 --- a/doc/extension.qbk +++ b/doc/extension.qbk @@ -400,7 +400,7 @@ producing a conforming Fusion sequence. [heading Usage] The user of __sequence_facade__ derives his sequence type from a specialization of __sequence_facade__ and passes the derived sequence type as the first template parameter. The second template parameter should be the traversal category of the sequence being implemented. The 3rd parameter should be set to `mpl::true_` if the sequence is a view. -The user must the implement the key expressions required by their sequence type. +The user must implement the key expressions required by their sequence type. [table Parameters [[Name][Description]] @@ -447,7 +447,7 @@ producing a conforming Fusion iterator. [heading Usage] The user of iterator_facade derives his iterator type from a specialization of iterator_facade and passes the derived iterator type as the first template parameter. The second template parameter should be the traversal category of the iterator being implemented. -The user must the implement the key expressions required by their iterator type. +The user must implement the key expressions required by their iterator type. [table Parameters [[Name][Description]] diff --git a/doc/functional.qbk b/doc/functional.qbk index 4a8e3d81..7205a0b2 100644 --- a/doc/functional.qbk +++ b/doc/functional.qbk @@ -689,7 +689,7 @@ is not implemented). [[`R`] [A possibly const qualified __callable_obj__ type or reference type thereof]] [[`r`] [An object convertible to `R`]] [[`s`] [A __sequence__ of arguments that are accepted by `r`]] - [[`f`] [An instance of `fused`]] + [[`f`] [An instance of `fused_procedure`]] ] [heading Expression Semantics] diff --git a/doc/fusion.qbk b/doc/fusion.qbk index 81542f02..0a24cb32 100644 --- a/doc/fusion.qbk +++ b/doc/fusion.qbk @@ -79,6 +79,7 @@ [def __bidirectional_iterator__ [link fusion.iterator.concepts.bidirectional_iterator Bidirectional Iterator]] [def __random_access_iterator__ [link fusion.iterator.concepts.random_access_iterator Random Access Iterator]] [def __associative_iterator__ [link fusion.iterator.concepts.associative_iterator Associative Iterator]] +[def __unbounded_iterator__ [link fusion.iterator.concepts.unbounded_iterator Unbounded Iterator]] [def __next__ [link fusion.iterator.functions.next `next`]] [def __prior__ [link fusion.iterator.functions.prior `prior`]] @@ -108,6 +109,7 @@ [def __bidirectional_sequence__ [link fusion.sequence.concepts.bidirectional_sequence Bidirectional Sequence]] [def __random_access_sequence__ [link fusion.sequence.concepts.random_access_sequence Random Access Sequence]] [def __associative_sequence__ [link fusion.sequence.concepts.associative_sequence Associative Sequence]] +[def __unbounded_sequence__ [link fusion.sequence.concepts.unbounded_sequence Unbounded Sequence]] [def __containers__ [link fusion.container Container]] [def __vector__ [link fusion.container.vector `vector`]] @@ -337,6 +339,8 @@ [def __adt_attribute_proxy__ [link fusion.notes.adt_attribute_proxy `adt_attribute_proxy`]] +[def __window_function__ [@http://en.wikipedia.org/wiki/Window_function Window Function]] + [include preface.qbk] [include introduction.qbk] [include quick_start.qbk] diff --git a/doc/html/index.html b/doc/html/index.html index 0fd880b6..957609a9 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -69,6 +69,8 @@ Access Iterator
Associative Iterator
+
Unbounded + Iterator
Functions
@@ -116,6 +118,8 @@ Access Sequence
Associative Sequence
+
Unbounded + Sequence
Intrinsic
@@ -274,7 +278,7 @@ - +

Last revised: May 10, 2013 at 05:54:18 GMT

Last revised: June 25, 2015 at 13:41:27 GMT


diff --git a/doc/iterator.qbk b/doc/iterator.qbk index d400003c..ef33240a 100644 --- a/doc/iterator.qbk +++ b/doc/iterator.qbk @@ -257,6 +257,12 @@ expressions must be valid: [endsect] +[section Unbounded Iterator] + +[warning In this release, __unbounded_iterator__ concept has no effect. It's reserved for future release.] + +[endsect] + [endsect] [section Functions] diff --git a/doc/sequence.qbk b/doc/sequence.qbk index 5957a6e1..a9fc83d3 100644 --- a/doc/sequence.qbk +++ b/doc/sequence.qbk @@ -39,6 +39,11 @@ These concepts pertain to sequence traversal. The __associative_sequence__ concept is orthogonal to traversal. An Associative Sequence allows efficient retrieval of elements based on keys. +[heading Boundary] + +The __unbounded_sequence__ concept is also orthogonal to traversal and associativity. +A Unbounded Sequence allows out-of-bounds access. + [section Forward Sequence] [heading Description] @@ -359,6 +364,55 @@ you can use `__result_of_value_at_key__`.] [endsect] +[section Unbounded Sequence] + +[heading Description] + +A Unbounded Sequence allows Out-of-Bounds access: it will achieve something like a __window_function__. +Most of the sequences do not meet this concept, but some special usecases do. + +[important User extending sequences should handle any parameters or be SFINAE-friendly.] + +[variablelist Notation + [[`s`] [An Fusion Sequence]] + [[`S`] [An Fusion Sequence type]] + [[`M`] [An __mpl__ integral constant]] + [[`N`] [An integral constant]] + [[`K`] [An arbitrary /key/ type]] + [[`o`] [An arbitrary object]] + [[`e`] [A Sequence element]] +] + +[heading Valid Expressions] + +[table + [[Expression] [Return type] [Type Requirements] [Runtime Complexity]] + [[`__at_c__(s)`] [Any type] [] [Depends on its traversability]] + [[`__at_c__(s) = o`] [Any type] [] [Depends on its traversability]] + [[`__at__(s)`] [Any type] [] [Depends on its traversability]] + [[`__at__(s) = o`] [Any type] [] [Depends on its traversability]] + [[`__at_key__(s)`] [Any type] [`S` should be __associative_sequence__] [Depends on its traversability]] + [[`__at_key__(s) = o`] [Any type] [`S` should be __associative_sequence__] [Depends on its traversability]] +] + +[heading Result Type Expressions] + +[table + [[Expression] [Compile Time Complexity]] + [[`__result_of_at__::type`] [Depends on its traversability]] + [[`__result_of_at_c__::type`] [Depends on its traversability]] + [[`__result_of_value_at__::type`] [Depends on its traversability]] + [[`__result_of_value_at_c__::type`] [Depends on its traversability]] + [[`__result_of_at_key__::type`] [Depends on its traversability]] + [[`__result_of_value_at_key__::type`] [Depends on its traversability]] +] + +[heading Models] + +* none. + +[endsect] + [endsect] [section Intrinsic] @@ -686,7 +740,7 @@ element from the beginning of the sequence, is a valid expression. Else, returns a type convertible to the M-th element from the beginning of the sequence. -[*Precondition]: `0 <= M::value < __size__(s)` +[*Precondition]: `0 <= M::value < __size__(seq)` (where `seq` is not __unbounded_sequence__) [*Semantics]: Equivalent to @@ -739,7 +793,7 @@ element from the beginning of the sequence, is a valid expression. Else, returns a type convertible to the N-th element from the beginning of the sequence. -[*Precondition]: `0 <= N < __size__(s)` +[*Precondition]: `0 <= N < __size__(seq)` (where `seq` is not __unbounded_sequence__) [*Semantics]: Equivalent to @@ -833,7 +887,7 @@ the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the element associated with Key, is a valid expression. Else, returns a type convertible to the element associated with Key. -[*Precondition]: `has_key(seq) == true` +[*Precondition]: `has_key(seq) == true` (where `seq` is not __unbounded_sequence__) [*Semantics]: Returns the element associated with Key. @@ -1149,6 +1203,8 @@ the actual element type, use __result_of_value_at__]. [*Return type]: Any type. +[*Precondition]: `0 <= M::value < __result_of_size__::value` (where `Seq` is not __unbounded_sequence__) + [*Semantics]: Returns the result type of using __at__ to access the `M`th element of `Seq`. [heading Header] @@ -1191,6 +1247,8 @@ get the actual element type, use __result_of_value_at_c__]. [*Return type]: Any type +[*Precondition]: `0 <= N < __result_of_size__::value` (where `Seq` is not __unbounded_sequence__) + [*Semantics]: Returns the result type of using __at_c__ to access the `N`th element of `Seq`. [heading Header] @@ -1350,6 +1408,8 @@ you want to get the actual element type, use __result_of_value_at_key__]. [*Return type]: Any type. +[*Precondition]: `has_key::type::value == true` (where `Seq` is not __unbounded_sequence__) + [*Semantics]: Returns the result of using __at_key__ to access the element with key type `Key` in `Seq`. [heading Header] @@ -1388,6 +1448,8 @@ Returns the actual element type associated with a Key from the __sequence__. [*Return type]: Any type. +[*Precondition]: `has_key::type::value == true` (where `Seq` is not __unbounded_sequence__) + [*Semantics]: Returns the actual element type associated with key type `Key` in `Seq`. diff --git a/doc/support.qbk b/doc/support.qbk index 3e7b7a70..3e3b8a4e 100644 --- a/doc/support.qbk +++ b/doc/support.qbk @@ -227,6 +227,8 @@ And optionally from: namespace boost { namespace fusion { struct associative_tag {}; + + struct unbounded_tag {}; }} [*Semantics]: Establishes the conceptual classification of a particular diff --git a/include/boost/fusion/adapted/std_tuple/detail/build_std_tuple.hpp b/include/boost/fusion/adapted/std_tuple/detail/build_std_tuple.hpp index 41e0d434..b60dc76f 100644 --- a/include/boost/fusion/adapted/std_tuple/detail/build_std_tuple.hpp +++ b/include/boost/fusion/adapted/std_tuple/detail/build_std_tuple.hpp @@ -7,26 +7,26 @@ #if !defined(BOOST_FUSION_BUILD_STD_TUPLE_05292014_0100) #define BOOST_FUSION_BUILD_STD_TUPLE_05292014_0100 -#include -#include #include +#include #include #include #include #include #include +#include namespace boost { namespace fusion { namespace detail { - template ::value - > + template ::value> struct build_std_tuple; template struct build_std_tuple { typedef std::tuple<> type; + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(First const&, Last const&) @@ -35,35 +35,18 @@ namespace boost { namespace fusion { namespace detail } }; - template struct indexed_tuple { }; - - template > - struct make_indexed_tuple; - - template - struct make_indexed_tuple> - { - typedef typename - boost::mpl::eval_if_c< - (Head == 0), - boost::mpl::identity>, - make_indexed_tuple> - >::type - type; - }; - template struct push_front_std_tuple; template - struct push_front_std_tuple> + struct push_front_std_tuple > { typedef std::tuple type; - template + template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type - indexed_call(T const& first, std::tuple const& rest, indexed_tuple) + indexed_call(T const& first, std::tuple const& rest, index_sequence) { return type(first, std::get(rest)...); } @@ -72,7 +55,7 @@ namespace boost { namespace fusion { namespace detail static type call(T const& first, std::tuple const& rest) { - typedef typename make_indexed_tuple::type gen; + typedef typename make_index_sequence::type gen; return indexed_call(first, rest, gen()); } }; diff --git a/include/boost/fusion/adapted/struct/adapt_struct.hpp b/include/boost/fusion/adapted/struct/adapt_struct.hpp index e96e7c76..2744f5b2 100644 --- a/include/boost/fusion/adapted/struct/adapt_struct.hpp +++ b/include/boost/fusion/adapted/struct/adapt_struct.hpp @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include #include #include @@ -61,25 +63,28 @@ (1)NAME_SEQ, \ struct_tag, \ 0, \ - BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \ + BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \ + BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)), \ BOOST_FUSION_ADAPT_STRUCT_C) -# define BOOST_FUSION_ADAPT_STRUCT(NAME, ...) \ +# define BOOST_FUSION_ADAPT_STRUCT(...) \ BOOST_FUSION_ADAPT_STRUCT_BASE( \ (0), \ - (0)(NAME), \ + (0)(BOOST_PP_SEQ_HEAD(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \ struct_tag, \ 0, \ - BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \ + BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \ + BOOST_PP_SEQ_TAIL(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \ BOOST_FUSION_ADAPT_STRUCT_C) -# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ...) \ +# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(...) \ BOOST_FUSION_ADAPT_STRUCT_BASE( \ (0), \ - (0)(NAME), \ + (0)(BOOST_PP_SEQ_HEAD(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \ struct_tag, \ 1, \ - BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \ + BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \ + BOOST_PP_SEQ_TAIL(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \ BOOST_FUSION_ADAPT_STRUCT_C) #else // BOOST_PP_VARIADICS diff --git a/include/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp b/include/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp index 69d5b204..7a83bb34 100644 --- a/include/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp +++ b/include/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp @@ -49,14 +49,16 @@ # define BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER_OP(r, unused, elem) \ BOOST_PP_IF(BOOST_FUSION_PP_IS_SEQ(elem), \ BOOST_PP_CAT( BOOST_FUSION_ADAPT_STRUCT_FILLER_0 elem ,_END), \ - BOOST_FUSION_ADAPT_STRUCT_WRAP_ATTR(BOOST_FUSION_ADAPT_AUTO, \ - elem)) + BOOST_PP_IF(BOOST_PP_IS_EMPTY(elem), \ + BOOST_PP_EMPTY(), \ + BOOST_FUSION_ADAPT_STRUCT_WRAP_ATTR(BOOST_FUSION_ADAPT_AUTO,elem))\ + ) -# define BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(...) \ +# define BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(VA_ARGS_SEQ) \ BOOST_PP_SEQ_PUSH_FRONT( \ BOOST_PP_SEQ_FOR_EACH( \ BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER_OP, \ - unused, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)), \ + unused, VA_ARGS_SEQ), \ (0,0)) #endif // BOOST_PP_VARIADICS diff --git a/include/boost/fusion/algorithm/iteration/reverse_fold.hpp b/include/boost/fusion/algorithm/iteration/reverse_fold.hpp index 76e6bf25..dffff79e 100644 --- a/include/boost/fusion/algorithm/iteration/reverse_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/reverse_fold.hpp @@ -10,6 +10,7 @@ #define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_FOLD_HPP #include +#include #include #include #include diff --git a/include/boost/fusion/algorithm/iteration/reverse_iter_fold.hpp b/include/boost/fusion/algorithm/iteration/reverse_iter_fold.hpp index e49f8b83..d36861f3 100644 --- a/include/boost/fusion/algorithm/iteration/reverse_iter_fold.hpp +++ b/include/boost/fusion/algorithm/iteration/reverse_iter_fold.hpp @@ -9,6 +9,7 @@ #define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_ITER_FOLD_HPP #include +#include #include #include #include diff --git a/include/boost/fusion/container/deque/detail/cpp03/deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque.hpp index 7c9417e5..db8a967a 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque.hpp @@ -94,13 +94,13 @@ namespace boost { namespace fusion { {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque const& seq) : base(seq) {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq, typename disable_if >::type* /*dummy*/ = 0) : base(base::from_iterator(fusion::begin(seq))) {} @@ -129,7 +129,7 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 , typename enable_if >::type* /*dummy*/ = 0 ) @@ -140,7 +140,7 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) : base(std::forward(rhs)) {} template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque&& seq , typename disable_if< is_convertible, T0> diff --git a/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp index 21b49345..fcbd74a7 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp @@ -24,7 +24,6 @@ #include #include -#include #define FUSION_VOID(z, n, _) void_ diff --git a/include/boost/fusion/container/deque/detail/cpp03/limits.hpp b/include/boost/fusion/container/deque/detail/cpp03/limits.hpp index 7892ba1a..16e25fa0 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/limits.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/limits.hpp @@ -12,7 +12,7 @@ #error "C++03 only! This file should not have been included" #endif -#include +#include #if !defined(FUSION_MAX_DEQUE_SIZE) # define FUSION_MAX_DEQUE_SIZE FUSION_MAX_VECTOR_SIZE diff --git a/include/boost/fusion/container/generation/detail/pp_list_tie.hpp b/include/boost/fusion/container/generation/detail/pp_list_tie.hpp new file mode 100644 index 00000000..be25627a --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_list_tie.hpp @@ -0,0 +1,102 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_PP_LIST_TIE_07192005_0109) +#define FUSION_PP_LIST_TIE_07192005_0109 + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/list_tie" FUSION_MAX_LIST_SIZE_STR".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_LIST_SIZE, typename T, void_) + , typename Extra = void_ + > + struct list_tie; + } + +// $$$ shouldn't we remove_reference first to allow references? $$$ +#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_REF + +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template + #define TEXT(z, n, text) , text + struct list_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) > + #undef TEXT + { + typedef list type; + }; + } + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline list + list_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) + { + return list( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/detail/pp_make_list.hpp b/include/boost/fusion/container/generation/detail/pp_make_list.hpp new file mode 100644 index 00000000..989bf36b --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_make_list.hpp @@ -0,0 +1,115 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_PP_MAKE_LIST_07192005_1239) +#define FUSION_PP_MAKE_LIST_07192005_1239 + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/make_list" FUSION_MAX_LIST_SIZE_STR".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_LIST_SIZE, typename T, void_) + , typename Extra = void_ + > + struct make_list; + + template <> + struct make_list<> + { + typedef list<> type; + }; + } + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline list<> + make_list() + { + return list<>(); + } + +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename detail::as_fusion_element::type + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_AS_FUSION_ELEMENT + +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template + #define TEXT(z, n, text) , text + struct make_list< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) > + #undef TEXT + { + typedef list type; + }; + } + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline list + make_list(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) + { + return list( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/detail/pp_make_set.hpp b/include/boost/fusion/container/generation/detail/pp_make_set.hpp new file mode 100644 index 00000000..f3f9a9e8 --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_make_set.hpp @@ -0,0 +1,134 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_MAKE_SET_09162005_1125) +#define FUSION_MAKE_SET_09162005_1125 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/make_set" FUSION_MAX_SET_SIZE_STR".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#define FUSION_HASH # +#endif + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename T, void_) + , typename Extra = void_ + > + struct make_set; + + template <> + struct make_set<> + { + typedef set<> type; + }; + } + + // XXX: +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +FUSION_HASH if defined(BOOST_CLANG) + BOOST_CXX14_CONSTEXPR +FUSION_HASH else + BOOST_CONSTEXPR +FUSION_HASH endif +#else +#if defined(BOOST_CLANG) + BOOST_CXX14_CONSTEXPR +#else + BOOST_CONSTEXPR +#endif +#endif + BOOST_FUSION_GPU_ENABLED + inline set<> + make_set() + { + return set<>(); + } + +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename detail::as_fusion_element::type + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_ELEMENT +#undef BOOST_FUSION_AS_ELEMENT + +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#undef FUSION_HASH +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template + #define TEXT(z, n, text) , text + struct make_set< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_SET_SIZE, TEXT, void_) > + #undef TEXT + { + typedef set type; + }; + } + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline set + make_set(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) + { + return set( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/detail/pp_make_vector.hpp b/include/boost/fusion/container/generation/detail/pp_make_vector.hpp new file mode 100644 index 00000000..b19cf354 --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_make_vector.hpp @@ -0,0 +1,115 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_MAKE_VECTOR_07162005_0243) +#define FUSION_MAKE_VECTOR_07162005_0243 + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/make_vector" FUSION_MAX_VECTOR_SIZE_STR".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename T, void_) + , typename Extra = void_ + > + struct make_vector; + + template <> + struct make_vector<> + { + typedef vector0<> type; + }; + } + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline vector0<> + make_vector() + { + return vector0<>(); + } + +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename detail::as_fusion_element::type + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_AS_FUSION_ELEMENT + +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template + #define TEXT(z, n, text) , text + struct make_vector< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_) > + #undef TEXT + { + typedef BOOST_PP_CAT(vector, N) type; + }; + } + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline BOOST_PP_CAT(vector, N) + make_vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) + { + return BOOST_PP_CAT(vector, N)( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/detail/pp_vector_tie.hpp b/include/boost/fusion/container/generation/detail/pp_vector_tie.hpp new file mode 100644 index 00000000..132c38af --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_vector_tie.hpp @@ -0,0 +1,100 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_VECTOR_TIE_07192005_1242) +#define FUSION_VECTOR_TIE_07192005_1242 + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector_tie" FUSION_MAX_VECTOR_SIZE_STR".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename T, void_) + , typename Extra = void_ + > + struct vector_tie; + } + +#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_REF +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template + #define TEXT(z, n, text) , text + struct vector_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_) > + #undef TEXT + { + typedef vector type; + }; + } + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline vector + vector_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) + { + return vector( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/list_tie.hpp b/include/boost/fusion/container/generation/list_tie.hpp index 1dccb515..91907167 100644 --- a/include/boost/fusion/container/generation/list_tie.hpp +++ b/include/boost/fusion/container/generation/list_tie.hpp @@ -1,102 +1,44 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2015 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_LIST_TIE_07192005_0109) -#define FUSION_LIST_TIE_07192005_0109 +#ifndef FUSION_LIST_TIE_06182015_0825 +#define FUSION_LIST_TIE_06182015_0825 -#include -#include -#include -#include -#include -#include +#include #include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#if !defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# include #else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/list_tie" FUSION_MAX_LIST_SIZE_STR".hpp") -#endif -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic interface +/////////////////////////////////////////////////////////////////////////////// namespace boost { namespace fusion { - struct void_; - namespace result_of { - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_LIST_SIZE, typename T, void_) - , typename Extra = void_ - > - struct list_tie; - } - -// $$$ shouldn't we remove_reference first to allow references? $$$ -#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_REF - -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - -#endif -#else // defined(BOOST_PP_IS_ITERATING) -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// - -#define N BOOST_PP_ITERATION() - - namespace result_of - { - template - #define TEXT(z, n, text) , text - struct list_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) > - #undef TEXT + template + struct list_tie { - typedef list type; + typedef list type; }; } - template + template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline list - list_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) + inline list + list_tie(T&... arg) { - return list( - BOOST_PP_ENUM_PARAMS(N, arg)); + return list(arg...); } +}} -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) +#endif + +#endif diff --git a/include/boost/fusion/container/generation/make_list.hpp b/include/boost/fusion/container/generation/make_list.hpp index 8cfc7e62..e88f553a 100644 --- a/include/boost/fusion/container/generation/make_list.hpp +++ b/include/boost/fusion/container/generation/make_list.hpp @@ -1,115 +1,46 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_MAKE_LIST_07192005_1239) -#define FUSION_MAKE_LIST_07192005_1239 +#ifndef FUSION_MAKE_LIST_10262014_0647 +#define FUSION_MAKE_LIST_10262014_0647 -#include -#include -#include -#include -#include +#include #include -#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#if !defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# include #else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_list" FUSION_MAX_LIST_SIZE_STR".hpp") -#endif -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic interface +/////////////////////////////////////////////////////////////////////////////// - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +#include namespace boost { namespace fusion { - struct void_; - namespace result_of { - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_LIST_SIZE, typename T, void_) - , typename Extra = void_ - > - struct make_list; - - template <> - struct make_list<> + template + struct make_list { - typedef list<> type; + typedef list::type...> type; }; } + template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline list<> - make_list() + inline typename result_of::make_list::type + make_list(T const&... arg) { - return list<>(); + return typename result_of::make_list::type(arg...); } + }} -#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ - typename detail::as_fusion_element::type - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_AS_FUSION_ELEMENT - -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES #endif -#else // defined(BOOST_PP_IS_ITERATING) -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// - -#define N BOOST_PP_ITERATION() - - namespace result_of - { - template - #define TEXT(z, n, text) , text - struct make_list< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) > - #undef TEXT - { - typedef list type; - }; - } - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline list - make_list(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) - { - return list( - BOOST_PP_ENUM_PARAMS(N, arg)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) +#endif diff --git a/include/boost/fusion/container/generation/make_set.hpp b/include/boost/fusion/container/generation/make_set.hpp index 0bde4a9c..705ec582 100644 --- a/include/boost/fusion/container/generation/make_set.hpp +++ b/include/boost/fusion/container/generation/make_set.hpp @@ -1,134 +1,16 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_MAKE_SET_09162005_1125) -#define FUSION_MAKE_SET_09162005_1125 +#ifndef FUSION_MAKE_SET_11112014_2255 +#define FUSION_MAKE_SET_11112014_2255 -#include -#include -#include -#include -#include #include #include -#include -#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_set" FUSION_MAX_SET_SIZE_STR".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#define FUSION_HASH # -#endif - -namespace boost { namespace fusion -{ - struct void_; - - namespace result_of - { - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_VECTOR_SIZE, typename T, void_) - , typename Extra = void_ - > - struct make_set; - - template <> - struct make_set<> - { - typedef set<> type; - }; - } - - // XXX: -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -FUSION_HASH if defined(BOOST_CLANG) - BOOST_CXX14_CONSTEXPR -FUSION_HASH else - BOOST_CONSTEXPR -FUSION_HASH endif -#else -#if defined(BOOST_CLANG) - BOOST_CXX14_CONSTEXPR -#else - BOOST_CONSTEXPR -#endif -#endif - BOOST_FUSION_GPU_ENABLED - inline set<> - make_set() - { - return set<>(); - } - -#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ - typename detail::as_fusion_element::type - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_ELEMENT -#undef BOOST_FUSION_AS_ELEMENT - -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#undef FUSION_HASH -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +# include #endif -#else // defined(BOOST_PP_IS_ITERATING) -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// - -#define N BOOST_PP_ITERATION() - - namespace result_of - { - template - #define TEXT(z, n, text) , text - struct make_set< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_SET_SIZE, TEXT, void_) > - #undef TEXT - { - typedef set type; - }; - } - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline set - make_set(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) - { - return set( - BOOST_PP_ENUM_PARAMS(N, arg)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) diff --git a/include/boost/fusion/container/generation/make_vector.hpp b/include/boost/fusion/container/generation/make_vector.hpp index 57cd9b10..8f067481 100644 --- a/include/boost/fusion/container/generation/make_vector.hpp +++ b/include/boost/fusion/container/generation/make_vector.hpp @@ -1,115 +1,16 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_MAKE_VECTOR_07162005_0243) -#define FUSION_MAKE_VECTOR_07162005_0243 +#ifndef FUSION_MAKE_VECTOR_11112014_2252 +#define FUSION_MAKE_VECTOR_11112014_2252 -#include -#include -#include -#include -#include +#include #include -#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_vector" FUSION_MAX_VECTOR_SIZE_STR".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct void_; - - namespace result_of - { - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_VECTOR_SIZE, typename T, void_) - , typename Extra = void_ - > - struct make_vector; - - template <> - struct make_vector<> - { - typedef vector0<> type; - }; - } - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline vector0<> - make_vector() - { - return vector0<>(); - } - -#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ - typename detail::as_fusion_element::type - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_AS_FUSION_ELEMENT - -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +# include #endif -#else // defined(BOOST_PP_IS_ITERATING) -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// - -#define N BOOST_PP_ITERATION() - - namespace result_of - { - template - #define TEXT(z, n, text) , text - struct make_vector< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_) > - #undef TEXT - { - typedef BOOST_PP_CAT(vector, N) type; - }; - } - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline BOOST_PP_CAT(vector, N) - make_vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) - { - return BOOST_PP_CAT(vector, N)( - BOOST_PP_ENUM_PARAMS(N, arg)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) diff --git a/include/boost/fusion/container/generation/vector_tie.hpp b/include/boost/fusion/container/generation/vector_tie.hpp index 28efa3bd..5bb4face 100644 --- a/include/boost/fusion/container/generation/vector_tie.hpp +++ b/include/boost/fusion/container/generation/vector_tie.hpp @@ -1,100 +1,15 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_VECTOR_TIE_07192005_1242) -#define FUSION_VECTOR_TIE_07192005_1242 +#ifndef FUSION_VECTOR_TIE_11112014_2302 +#define FUSION_VECTOR_TIE_11112014_2302 -#include -#include -#include -#include -#include -#include -#include +#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector_tie" FUSION_MAX_VECTOR_SIZE_STR".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct void_; - - namespace result_of - { - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_VECTOR_SIZE, typename T, void_) - , typename Extra = void_ - > - struct vector_tie; - } - -#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_REF -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +# include #endif -#else // defined(BOOST_PP_IS_ITERATING) -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// - -#define N BOOST_PP_ITERATION() - - namespace result_of - { - template - #define TEXT(z, n, text) , text - struct vector_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_) > - #undef TEXT - { - typedef vector type; - }; - } - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline vector - vector_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) - { - return vector( - BOOST_PP_ENUM_PARAMS(N, arg)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) diff --git a/include/boost/fusion/container/list.hpp b/include/boost/fusion/container/list.hpp index bdb5dc9a..e3a1d8ef 100644 --- a/include/boost/fusion/container/list.hpp +++ b/include/boost/fusion/container/list.hpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/include/boost/fusion/container/list/cons.hpp b/include/boost/fusion/container/list/cons.hpp index 61d8dbcf..e05b62eb 100644 --- a/include/boost/fusion/container/list/cons.hpp +++ b/include/boost/fusion/container/list/cons.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -73,12 +74,13 @@ namespace boost { namespace fusion : car(rhs.car), cdr(rhs.cdr) {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED cons( Sequence const& seq , typename boost::enable_if< mpl::and_< traits::is_sequence + , mpl::not_ > , mpl::not_ > > // use copy to car instead >::type* /*dummy*/ = 0 ) diff --git a/include/boost/fusion/container/list/limits.hpp b/include/boost/fusion/container/list/detail/cpp03/limits.hpp similarity index 100% rename from include/boost/fusion/container/list/limits.hpp rename to include/boost/fusion/container/list/detail/cpp03/limits.hpp diff --git a/include/boost/fusion/container/list/detail/cpp03/list.hpp b/include/boost/fusion/container/list/detail/cpp03/list.hpp new file mode 100644 index 00000000..b39489b0 --- /dev/null +++ b/include/boost/fusion/container/list/detail/cpp03/list.hpp @@ -0,0 +1,102 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_LIST_07172005_1153) +#define FUSION_LIST_07172005_1153 + +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/list" FUSION_MAX_LIST_SIZE_STR ".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct nil_; + struct void_; + + template + struct list + : detail::list_to_cons::type + { + private: + typedef + detail::list_to_cons + list_to_cons; + typedef typename list_to_cons::type inherited_type; + + public: + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + list() + : inherited_type() {} + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + list(list const& rhs) + : inherited_type(rhs) {} + + template + BOOST_FUSION_GPU_ENABLED + list(Sequence const& rhs + , typename boost::enable_if >::type* = 0) + : inherited_type(rhs) {} + + // Expand a couple of forwarding constructors for arguments + // of type (T0), (T0, T1), (T0, T1, T2) etc. Exanple: + // + // list( + // typename detail::call_param::type arg0 + // , typename detail::call_param::type arg1) + // : inherited_type(list_to_cons::call(arg0, arg1)) {} + #include + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + list& + operator=(list const& rhs) + { + inherited_type::operator=(rhs); + return *this; + } + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename boost::enable_if, list&>::type + operator=(Sequence const& rhs) + { + inherited_type::operator=(rhs); + return *this; + } + }; +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif diff --git a/include/boost/fusion/container/list/detail/list_forward_ctor.hpp b/include/boost/fusion/container/list/detail/cpp03/list_forward_ctor.hpp similarity index 95% rename from include/boost/fusion/container/list/detail/list_forward_ctor.hpp rename to include/boost/fusion/container/list/detail/cpp03/list_forward_ctor.hpp index a5c8aa66..f9a70678 100644 --- a/include/boost/fusion/container/list/detail/list_forward_ctor.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/list_forward_ctor.hpp @@ -18,7 +18,7 @@ #define FUSION_LIST_CL_PAREN(z, n, type) ) #define BOOST_PP_FILENAME_1 \ - + #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/list/detail/cpp03/list_fwd.hpp b/include/boost/fusion/container/list/detail/cpp03/list_fwd.hpp new file mode 100644 index 00000000..cedc7003 --- /dev/null +++ b/include/boost/fusion/container/list/detail/cpp03/list_fwd.hpp @@ -0,0 +1,51 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_LIST_FORWARD_07172005_0224) +#define FUSION_LIST_FORWARD_07172005_0224 + +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/list" FUSION_MAX_LIST_SIZE_STR "_fwd.hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_LIST_SIZE, typename T, void_) + > + struct list; +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif diff --git a/include/boost/fusion/container/list/detail/cpp03/list_to_cons.hpp b/include/boost/fusion/container/list/detail/cpp03/list_to_cons.hpp new file mode 100644 index 00000000..989e91ab --- /dev/null +++ b/include/boost/fusion/container/list/detail/cpp03/list_to_cons.hpp @@ -0,0 +1,76 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_LIST_TO_CONS_07172005_1041) +#define FUSION_LIST_TO_CONS_07172005_1041 + +#include +#include +#include +#include +#include +#include +#include + +#define FUSION_VOID(z, n, _) void_ + +namespace boost { namespace fusion +{ + struct nil_; + struct void_; +}} + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/list_to_cons" FUSION_MAX_LIST_SIZE_STR ".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion { namespace detail +{ + template + struct list_to_cons + { + typedef T0 head_type; + typedef list_to_cons< + BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_LIST_SIZE, T), void_> + tail_list_to_cons; + typedef typename tail_list_to_cons::type tail_type; + + typedef cons type; + + #include + }; + + template <> + struct list_to_cons + { + typedef nil_ type; + }; +}}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#undef FUSION_VOID +#endif diff --git a/include/boost/fusion/container/list/detail/list_to_cons_call.hpp b/include/boost/fusion/container/list/detail/cpp03/list_to_cons_call.hpp similarity index 95% rename from include/boost/fusion/container/list/detail/list_to_cons_call.hpp rename to include/boost/fusion/container/list/detail/cpp03/list_to_cons_call.hpp index fbae5800..e49db4a8 100644 --- a/include/boost/fusion/container/list/detail/list_to_cons_call.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/list_to_cons_call.hpp @@ -13,7 +13,7 @@ #include #define BOOST_PP_FILENAME_1 \ - + #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/list/detail/preprocessed/list.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list.hpp similarity index 63% rename from include/boost/fusion/container/list/detail/preprocessed/list.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list.hpp index 315ffcf7..7af66f49 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_LIST_SIZE <= 10 -#include +#include #elif FUSION_MAX_LIST_SIZE <= 20 -#include +#include #elif FUSION_MAX_LIST_SIZE <= 30 -#include +#include #elif FUSION_MAX_LIST_SIZE <= 40 -#include +#include #elif FUSION_MAX_LIST_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_LIST_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/list/detail/preprocessed/list10.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list10.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp index 9a289365..69ffc9c2 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list10.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp @@ -18,8 +18,8 @@ namespace boost { namespace fusion typedef detail::list_to_cons list_to_cons; - public: typedef typename list_to_cons::type inherited_type; + public: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED list() : inherited_type() {} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list10_fwd.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list10_fwd.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp diff --git a/include/boost/fusion/container/list/detail/preprocessed/list20.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list20.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp index a201cb44..0d6ea768 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list20.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp @@ -18,8 +18,8 @@ namespace boost { namespace fusion typedef detail::list_to_cons list_to_cons; - public: typedef typename list_to_cons::type inherited_type; + public: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED list() : inherited_type() {} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list20_fwd.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list20_fwd.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp diff --git a/include/boost/fusion/container/list/detail/preprocessed/list30.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list30.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp index ef9e65fc..9087c119 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list30.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp @@ -18,8 +18,8 @@ namespace boost { namespace fusion typedef detail::list_to_cons list_to_cons; - public: typedef typename list_to_cons::type inherited_type; + public: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED list() : inherited_type() {} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list30_fwd.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list30_fwd.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp diff --git a/include/boost/fusion/container/list/detail/preprocessed/list40.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list40.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp index 570b2ccd..24a474fe 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list40.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp @@ -18,8 +18,8 @@ namespace boost { namespace fusion typedef detail::list_to_cons list_to_cons; - public: typedef typename list_to_cons::type inherited_type; + public: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED list() : inherited_type() {} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list40_fwd.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list40_fwd.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp diff --git a/include/boost/fusion/container/list/detail/preprocessed/list50.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list50.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp index d237cdf9..b810bea1 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list50.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp @@ -18,8 +18,8 @@ namespace boost { namespace fusion typedef detail::list_to_cons list_to_cons; - public: typedef typename list_to_cons::type inherited_type; + public: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED list() : inherited_type() {} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list50_fwd.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list50_fwd.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_fwd.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp similarity index 62% rename from include/boost/fusion/container/list/detail/preprocessed/list_fwd.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp index b9be3475..8a4037da 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list_fwd.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_LIST_SIZE <= 10 -#include +#include #elif FUSION_MAX_LIST_SIZE <= 20 -#include +#include #elif FUSION_MAX_LIST_SIZE <= 30 -#include +#include #elif FUSION_MAX_LIST_SIZE <= 40 -#include +#include #elif FUSION_MAX_LIST_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_LIST_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons.hpp similarity index 60% rename from include/boost/fusion/container/list/detail/preprocessed/list_to_cons.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons.hpp index 0326bef1..d9ee9bb2 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_LIST_SIZE <= 10 -#include +#include #elif FUSION_MAX_LIST_SIZE <= 20 -#include +#include #elif FUSION_MAX_LIST_SIZE <= 30 -#include +#include #elif FUSION_MAX_LIST_SIZE <= 40 -#include +#include #elif FUSION_MAX_LIST_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_LIST_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons10.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons10.hpp diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons20.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons20.hpp diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons30.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons30.hpp diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons40.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons40.hpp diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons50.hpp similarity index 100% rename from include/boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp rename to include/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons50.hpp diff --git a/include/boost/fusion/container/list/detail/list_to_cons.hpp b/include/boost/fusion/container/list/detail/list_to_cons.hpp index bc871863..1ce1cfba 100644 --- a/include/boost/fusion/container/list/detail/list_to_cons.hpp +++ b/include/boost/fusion/container/list/detail/list_to_cons.hpp @@ -1,76 +1,61 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014-2015 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_LIST_TO_CONS_07172005_1041) -#define FUSION_LIST_TO_CONS_07172005_1041 +#ifndef FUSION_LIST_MAIN_10262014_0447 +#define FUSION_LIST_MAIN_10262014_0447 +#include #include -#include -#include -#include -#include -#include -#include +#include -#define FUSION_VOID(z, n, _) void_ - -namespace boost { namespace fusion -{ - struct nil_; - struct void_; -}} - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# include #else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "preprocessed/list_to_cons" FUSION_MAX_LIST_SIZE_STR ".hpp") -#endif -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include +#include namespace boost { namespace fusion { namespace detail { - template - struct list_to_cons + template + struct list_to_cons; + + template <> + struct list_to_cons<> { - typedef T0 head_type; - typedef list_to_cons< - BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_LIST_SIZE, T), void_> - tail_list_to_cons; + typedef nil_ type; + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static type call() { return type(); } + }; + + template + struct list_to_cons + { + typedef Head head_type; + typedef list_to_cons tail_list_to_cons; typedef typename tail_list_to_cons::type tail_type; typedef cons type; - #include - }; - - template <> - struct list_to_cons - { - typedef nil_ type; + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static type + call(typename detail::call_param::type _h, + typename detail::call_param::type ..._t) + { + return type(_h, tail_list_to_cons::call(_t...)); + } }; }}} -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) #endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - -#undef FUSION_VOID #endif diff --git a/include/boost/fusion/container/list/list.hpp b/include/boost/fusion/container/list/list.hpp index 5b584131..865a6d7d 100644 --- a/include/boost/fusion/container/list/list.hpp +++ b/include/boost/fusion/container/list/list.hpp @@ -1,103 +1,127 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014-2015 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_LIST_07172005_1153) -#define FUSION_LIST_07172005_1153 +#ifndef FUSION_LIST_10262014_0537 +#define FUSION_LIST_10262014_0537 #include #include -#include -#include -#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# include #else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/list" FUSION_MAX_LIST_SIZE_STR ".hpp") -#endif -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include +#include namespace boost { namespace fusion { struct nil_; - struct void_; - template - struct list - : detail::list_to_cons::type + template <> + struct list<> + : detail::list_to_cons<>::type { private: - typedef - detail::list_to_cons - list_to_cons; + typedef detail::list_to_cons<> list_to_cons; + typedef list_to_cons::type inherited_type; public: - typedef typename list_to_cons::type inherited_type; - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED list() : inherited_type() {} - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - list(list const& rhs) - : inherited_type(rhs) {} - +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - list(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + BOOST_FUSION_GPU_ENABLED + list(Sequence const& rhs) : inherited_type(rhs) {} - // Expand a couple of forwarding constructors for arguments - // of type (T0), (T0, T1), (T0, T1, T2) etc. Exanple: - // - // list( - // typename detail::call_param::type arg0 - // , typename detail::call_param::type arg1) - // : inherited_type(list_to_cons::call(arg0, arg1)) {} - #include - - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - list& - operator=(list const& rhs) - { - inherited_type::operator=(rhs); - return *this; - } - template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - typename boost::enable_if, list&>::type + list& operator=(Sequence const& rhs) { inherited_type::operator=(rhs); return *this; } +#else + template + BOOST_FUSION_GPU_ENABLED + list(Sequence&& rhs) + : inherited_type(std::forward(rhs)) {} + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + list& + operator=(Sequence&& rhs) + { + inherited_type::operator=(std::forward(rhs)); + return *this; + } +#endif + }; + + template + struct list + : detail::list_to_cons::type + { + private: + typedef detail::list_to_cons list_to_cons; + typedef typename list_to_cons::type inherited_type; + + public: + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + list() + : inherited_type() {} + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template + BOOST_FUSION_GPU_ENABLED + list(Sequence const& rhs) + : inherited_type(rhs) {} +#else + template + BOOST_FUSION_GPU_ENABLED + list(Sequence&& rhs) + : inherited_type(std::forward(rhs)) {} +#endif + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + explicit + list(typename detail::call_param::type ...args) + : inherited_type(list_to_cons::call(args...)) {} + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + list& + operator=(Sequence const& rhs) + { + inherited_type::operator=(rhs); + return *this; + } +#else + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + list& + operator=(Sequence&& rhs) + { + inherited_type::operator=(std::forward(rhs)); + return *this; + } +#endif }; }} -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) #endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - #endif diff --git a/include/boost/fusion/container/list/list_fwd.hpp b/include/boost/fusion/container/list/list_fwd.hpp index d827d283..c5f26192 100644 --- a/include/boost/fusion/container/list/list_fwd.hpp +++ b/include/boost/fusion/container/list/list_fwd.hpp @@ -1,51 +1,43 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_LIST_FORWARD_07172005_0224) -#define FUSION_LIST_FORWARD_07172005_0224 +#ifndef FUSION_LIST_FORWARD_10262014_0528 +#define FUSION_LIST_FORWARD_10262014_0528 #include -#include -#include +#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \ + || (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) +# if defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# undef BOOST_FUSION_HAS_VARIADIC_LIST +# endif #else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/list" FUSION_MAX_LIST_SIZE_STR "_fwd.hpp") +# if !defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# define BOOST_FUSION_HAS_VARIADIC_LIST +# endif #endif -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +/////////////////////////////////////////////////////////////////////////////// +// With no variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# include +#else +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// namespace boost { namespace fusion { struct void_; - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_LIST_SIZE, typename T, void_) - > + template struct list; }} -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) #endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - #endif diff --git a/include/boost/fusion/container/map/detail/cpp03/limits.hpp b/include/boost/fusion/container/map/detail/cpp03/limits.hpp index 43b5abb2..1eaa528c 100644 --- a/include/boost/fusion/container/map/detail/cpp03/limits.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/limits.hpp @@ -8,7 +8,7 @@ #define FUSION_MAP_LIMITS_07212005_1104 #include -#include +#include #if !defined(FUSION_MAX_MAP_SIZE) # define FUSION_MAX_MAP_SIZE FUSION_MAX_VECTOR_SIZE diff --git a/include/boost/fusion/container/map/detail/cpp03/map.hpp b/include/boost/fusion/container/map/detail/cpp03/map.hpp index e2f471b5..3ff1d05d 100644 --- a/include/boost/fusion/container/map/detail/cpp03/map.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/map.hpp @@ -85,7 +85,7 @@ namespace boost { namespace fusion : data(rhs.data) {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence const& rhs) : data(rhs) {} diff --git a/include/boost/fusion/container/map/map.hpp b/include/boost/fusion/container/map/map.hpp index f93a693f..e90d28a9 100644 --- a/include/boost/fusion/container/map/map.hpp +++ b/include/boost/fusion/container/map/map.hpp @@ -66,21 +66,21 @@ namespace boost { namespace fusion {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence const& seq , typename enable_if>::type* /*dummy*/ = 0) : base_type(begin(seq), detail::map_impl_from_iterator()) {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence& seq , typename enable_if>::type* /*dummy*/ = 0) : base_type(begin(seq), detail::map_impl_from_iterator()) {} template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence&& seq , typename enable_if>::type* /*dummy*/ = 0) : base_type(begin(seq), detail::map_impl_from_iterator()) @@ -93,7 +93,7 @@ namespace boost { namespace fusion {} template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(First&& first, T_&&... rest) : base_type(BOOST_FUSION_FWD_ELEM(First, first), BOOST_FUSION_FWD_ELEM(T_, rest)...) {} diff --git a/include/boost/fusion/container/set.hpp b/include/boost/fusion/container/set.hpp index 64453974..c9aa6241 100644 --- a/include/boost/fusion/container/set.hpp +++ b/include/boost/fusion/container/set.hpp @@ -8,7 +8,6 @@ #define FUSION_SEQUENCE_CLASS_SET_10022005_0607 #include -#include #include #include #include diff --git a/include/boost/fusion/container/set/detail/as_set.hpp b/include/boost/fusion/container/set/detail/as_set.hpp index a41498a3..1eb0d3fe 100644 --- a/include/boost/fusion/container/set/detail/as_set.hpp +++ b/include/boost/fusion/container/set/detail/as_set.hpp @@ -1,139 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_AS_SET_0932005_1341) -#define FUSION_AS_SET_0932005_1341 +#ifndef FUSION_AS_SET_11062014_2121 +#define FUSION_AS_SET_11062014_2121 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include -namespace boost { namespace fusion { namespace detail -{ -BOOST_FUSION_BARRIER_BEGIN - - template - struct as_set; - - template <> - struct as_set<0> - { - template - struct apply - { - typedef set<> type; - }; - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static typename apply::type - call(Iterator) - { - return set<>(); - } - }; - -BOOST_FUSION_BARRIER_END -}}} - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_set" FUSION_MAX_SET_SIZE_STR ".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion { namespace detail -{ -BOOST_FUSION_BARRIER_BEGIN - -#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ - typedef typename fusion::result_of::next::type \ - BOOST_PP_CAT(I, BOOST_PP_INC(n)); - -#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \ - typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \ - BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n)); - -#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \ - typedef typename fusion::result_of::value_of::type \ - BOOST_PP_CAT(T, n); - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_SET_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_NEXT_ITERATOR -#undef BOOST_FUSION_NEXT_CALL_ITERATOR -#undef BOOST_FUSION_VALUE_OF_ITERATOR - -BOOST_FUSION_BARRIER_END -}}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - -#endif -#else // defined(BOOST_PP_IS_ITERATING) /////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// +// Without variadics, we will use the PP version /////////////////////////////////////////////////////////////////////////////// +# include -#define N BOOST_PP_ITERATION() - - template <> - struct as_set - { - template - struct apply - { - BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _) - BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _) - typedef set type; - }; - - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static typename apply::type - call(Iterator const& i0) - { - typedef apply gen; - typedef typename gen::type result; - BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _) - return result(BOOST_PP_ENUM_PARAMS(N, *i)); - } - }; - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) +#endif diff --git a/include/boost/fusion/container/set/detail/cpp03/as_set.hpp b/include/boost/fusion/container/set/detail/cpp03/as_set.hpp new file mode 100644 index 00000000..c9159314 --- /dev/null +++ b/include/boost/fusion/container/set/detail/cpp03/as_set.hpp @@ -0,0 +1,139 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_AS_SET_0932005_1341) +#define FUSION_AS_SET_0932005_1341 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ +BOOST_FUSION_BARRIER_BEGIN + + template + struct as_set; + + template <> + struct as_set<0> + { + template + struct apply + { + typedef set<> type; + }; + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static typename apply::type + call(Iterator) + { + return set<>(); + } + }; + +BOOST_FUSION_BARRIER_END +}}} + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_set" FUSION_MAX_SET_SIZE_STR ".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion { namespace detail +{ +BOOST_FUSION_BARRIER_BEGIN + +#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::next::type \ + BOOST_PP_CAT(I, BOOST_PP_INC(n)); + +#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \ + typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \ + BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n)); + +#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::value_of::type \ + BOOST_PP_CAT(T, n); + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_SET_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_NEXT_ITERATOR +#undef BOOST_FUSION_NEXT_CALL_ITERATOR +#undef BOOST_FUSION_VALUE_OF_ITERATOR + +BOOST_FUSION_BARRIER_END +}}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + template <> + struct as_set + { + template + struct apply + { + BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _) + BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _) + typedef set type; + }; + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static typename apply::type + call(Iterator const& i0) + { + typedef apply gen; + typedef typename gen::type result; + BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _) + return result(BOOST_PP_ENUM_PARAMS(N, *i)); + } + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/set/limits.hpp b/include/boost/fusion/container/set/detail/cpp03/limits.hpp similarity index 93% rename from include/boost/fusion/container/set/limits.hpp rename to include/boost/fusion/container/set/detail/cpp03/limits.hpp index adfecdbd..2b800abf 100644 --- a/include/boost/fusion/container/set/limits.hpp +++ b/include/boost/fusion/container/set/detail/cpp03/limits.hpp @@ -8,7 +8,7 @@ #define FUSION_SET_LIMITS_09162005_1103 #include -#include +#include #if !defined(FUSION_MAX_SET_SIZE) # define FUSION_MAX_SET_SIZE FUSION_MAX_VECTOR_SIZE diff --git a/include/boost/fusion/container/set/detail/preprocessed/as_set.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set.hpp similarity index 62% rename from include/boost/fusion/container/set/detail/preprocessed/as_set.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set.hpp index 4231dcb1..da257ad9 100644 --- a/include/boost/fusion/container/set/detail/preprocessed/as_set.hpp +++ b/include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_SET_SIZE <= 10 -#include +#include #elif FUSION_MAX_SET_SIZE <= 20 -#include +#include #elif FUSION_MAX_SET_SIZE <= 30 -#include +#include #elif FUSION_MAX_SET_SIZE <= 40 -#include +#include #elif FUSION_MAX_SET_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_SET_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/set/detail/preprocessed/as_set10.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set10.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/as_set10.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set10.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/as_set20.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set20.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/as_set20.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set20.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/as_set30.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set30.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/as_set30.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set30.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/as_set40.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set40.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/as_set40.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set40.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/as_set50.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set50.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/as_set50.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/as_set50.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/set.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set.hpp similarity index 63% rename from include/boost/fusion/container/set/detail/preprocessed/set.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/set.hpp index a64fab2c..715d5744 100644 --- a/include/boost/fusion/container/set/detail/preprocessed/set.hpp +++ b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_SET_SIZE <= 10 -#include +#include #elif FUSION_MAX_SET_SIZE <= 20 -#include +#include #elif FUSION_MAX_SET_SIZE <= 30 -#include +#include #elif FUSION_MAX_SET_SIZE <= 40 -#include +#include #elif FUSION_MAX_SET_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_SET_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/set/detail/preprocessed/set10.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/set10.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/set10_fwd.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set10_fwd.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/set10_fwd.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/set10_fwd.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/set20.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/set20.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/set20_fwd.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set20_fwd.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/set20_fwd.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/set20_fwd.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/set30.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/set30.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/set30_fwd.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set30_fwd.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/set30_fwd.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/set30_fwd.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/set40.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/set40.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/set40_fwd.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set40_fwd.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/set40_fwd.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/set40_fwd.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/set50.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/set50.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/set50_fwd.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set50_fwd.hpp similarity index 100% rename from include/boost/fusion/container/set/detail/preprocessed/set50_fwd.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/set50_fwd.hpp diff --git a/include/boost/fusion/container/set/detail/preprocessed/set_fwd.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set_fwd.hpp similarity index 62% rename from include/boost/fusion/container/set/detail/preprocessed/set_fwd.hpp rename to include/boost/fusion/container/set/detail/cpp03/preprocessed/set_fwd.hpp index 28a3e814..31e8e411 100644 --- a/include/boost/fusion/container/set/detail/preprocessed/set_fwd.hpp +++ b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set_fwd.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_SET_SIZE <= 10 -#include +#include #elif FUSION_MAX_SET_SIZE <= 20 -#include +#include #elif FUSION_MAX_SET_SIZE <= 30 -#include +#include #elif FUSION_MAX_SET_SIZE <= 40 -#include +#include #elif FUSION_MAX_SET_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_SET_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/set/detail/cpp03/set.hpp b/include/boost/fusion/container/set/detail/cpp03/set.hpp new file mode 100644 index 00000000..46191c5c --- /dev/null +++ b/include/boost/fusion/container/set/detail/cpp03/set.hpp @@ -0,0 +1,106 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_SET_09162005_1104) +#define FUSION_SET_09162005_1104 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/set" FUSION_MAX_SET_SIZE_STR ".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + struct fusion_sequence_tag; + + template + struct set : sequence_base > + { + struct category : forward_traversal_tag, associative_tag {}; + + typedef set_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::false_ is_view; + + typedef vector< + BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)> + storage_type; + + typedef typename storage_type::size size; + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + set() + : data() {} + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + set(Sequence const& rhs + , typename boost::enable_if >::type* = 0) + : data(rhs) {} + + #include + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + set& + operator=(T const& rhs) + { + data = rhs; + return *this; + } + + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + storage_type& get_data() { return data; } + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + storage_type const& get_data() const { return data; } + + private: + + storage_type data; + }; +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif diff --git a/include/boost/fusion/container/set/detail/set_forward_ctor.hpp b/include/boost/fusion/container/set/detail/cpp03/set_forward_ctor.hpp similarity index 95% rename from include/boost/fusion/container/set/detail/set_forward_ctor.hpp rename to include/boost/fusion/container/set/detail/cpp03/set_forward_ctor.hpp index 5d396104..aa90b601 100644 --- a/include/boost/fusion/container/set/detail/set_forward_ctor.hpp +++ b/include/boost/fusion/container/set/detail/cpp03/set_forward_ctor.hpp @@ -13,7 +13,7 @@ #include #define BOOST_PP_FILENAME_1 \ - + #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_SET_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/set/detail/cpp03/set_fwd.hpp b/include/boost/fusion/container/set/detail/cpp03/set_fwd.hpp new file mode 100644 index 00000000..f50f6083 --- /dev/null +++ b/include/boost/fusion/container/set/detail/cpp03/set_fwd.hpp @@ -0,0 +1,53 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_SET_FORWARD_09162005_1102) +#define FUSION_SET_FORWARD_09162005_1102 + +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/set" FUSION_MAX_SET_SIZE_STR "_fwd.hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + struct set_tag; + struct set_iterator_tag; + + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_SET_SIZE, typename T, void_) + > + struct set; +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif diff --git a/include/boost/fusion/container/set/set.hpp b/include/boost/fusion/container/set/set.hpp index 65a080b0..59f4eafc 100644 --- a/include/boost/fusion/container/set/set.hpp +++ b/include/boost/fusion/container/set/set.hpp @@ -1,106 +1,20 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_SET_09162005_1104) -#define FUSION_SET_09162005_1104 +#ifndef FUSION_SET_11062014_1726 +#define FUSION_SET_11062014_1726 #include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/set" FUSION_MAX_SET_SIZE_STR ".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct void_; - struct fusion_sequence_tag; - - template - struct set : sequence_base > - { - struct category : forward_traversal_tag, associative_tag {}; - - typedef set_tag fusion_tag; - typedef fusion_sequence_tag tag; // this gets picked up by MPL - typedef mpl::false_ is_view; - - typedef vector< - BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)> - storage_type; - - typedef typename storage_type::size size; - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - set() - : data() {} - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - set(Sequence const& rhs - , typename boost::enable_if >::type* = 0) - : data(rhs) {} - - #include - - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - set& - operator=(T const& rhs) - { - data = rhs; - return *this; - } - - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - storage_type& get_data() { return data; } - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - storage_type const& get_data() const { return data; } - - private: - - storage_type data; - }; -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include #endif + + diff --git a/include/boost/fusion/container/set/set_fwd.hpp b/include/boost/fusion/container/set/set_fwd.hpp index 2de3db6d..50d8d1c8 100644 --- a/include/boost/fusion/container/set/set_fwd.hpp +++ b/include/boost/fusion/container/set/set_fwd.hpp @@ -1,53 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_SET_FORWARD_09162005_1102) -#define FUSION_SET_FORWARD_09162005_1102 +#ifndef FUSION_SET_FORWARD_11062014_1720 +#define FUSION_SET_FORWARD_11062014_1720 +#include #include -#include -#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/set" FUSION_MAX_SET_SIZE_STR "_fwd.hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct void_; - struct set_tag; - struct set_iterator_tag; - - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_SET_SIZE, typename T, void_) - > - struct set; -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// With no variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// +# include #endif + diff --git a/include/boost/fusion/container/vector.hpp b/include/boost/fusion/container/vector.hpp index 06fa5a04..a999c8b0 100644 --- a/include/boost/fusion/container/vector.hpp +++ b/include/boost/fusion/container/vector.hpp @@ -8,7 +8,7 @@ #define FUSION_SEQUENCE_CLASS_VECTOR_10022005_0602 #include -#include +#include #include #if (FUSION_MAX_VECTOR_SIZE > 10) diff --git a/include/boost/fusion/container/vector/detail/as_vector.hpp b/include/boost/fusion/container/vector/detail/as_vector.hpp index b5f5e2d0..eaaac896 100644 --- a/include/boost/fusion/container/vector/detail/as_vector.hpp +++ b/include/boost/fusion/container/vector/detail/as_vector.hpp @@ -1,139 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_AS_VECTOR_09222005_0950) -#define FUSION_AS_VECTOR_09222005_0950 +#ifndef FUSION_AS_VECTOR_11052014_1801 +#define FUSION_AS_VECTOR_11052014_1801 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include -namespace boost { namespace fusion { namespace detail -{ -BOOST_FUSION_BARRIER_BEGIN - - template - struct as_vector; - - template <> - struct as_vector<0> - { - template - struct apply - { - typedef vector0<> type; - }; - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static typename apply::type - call(Iterator) - { - return vector0<>(); - } - }; - -BOOST_FUSION_BARRIER_END -}}} - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_vector" FUSION_MAX_VECTOR_SIZE_STR ".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion { namespace detail -{ -BOOST_FUSION_BARRIER_BEGIN - -#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ - typedef typename fusion::result_of::next::type \ - BOOST_PP_CAT(I, BOOST_PP_INC(n)); - -#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \ - typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \ - BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n)); - -#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \ - typedef typename fusion::result_of::value_of::type \ - BOOST_PP_CAT(T, n); - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_NEXT_ITERATOR -#undef BOOST_FUSION_NEXT_CALL_ITERATOR -#undef BOOST_FUSION_VALUE_OF_ITERATOR - -BOOST_FUSION_BARRIER_END -}}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - -#endif -#else // defined(BOOST_PP_IS_ITERATING) /////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// +// Without variadics, we will use the PP version /////////////////////////////////////////////////////////////////////////////// +# include -#define N BOOST_PP_ITERATION() +#endif - template <> - struct as_vector - { - template - struct apply - { - BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _) - BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _) - typedef BOOST_PP_CAT(vector, N) type; - }; - - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static typename apply::type - call(Iterator const& i0) - { - typedef apply gen; - typedef typename gen::type result; - BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _) - return result(BOOST_PP_ENUM_PARAMS(N, *i)); - } - }; - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) diff --git a/include/boost/fusion/container/vector/detail/cpp03/as_vector.hpp b/include/boost/fusion/container/vector/detail/cpp03/as_vector.hpp new file mode 100644 index 00000000..bd7fa76b --- /dev/null +++ b/include/boost/fusion/container/vector/detail/cpp03/as_vector.hpp @@ -0,0 +1,139 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_AS_VECTOR_09222005_0950) +#define FUSION_AS_VECTOR_09222005_0950 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ +BOOST_FUSION_BARRIER_BEGIN + + template + struct as_vector; + + template <> + struct as_vector<0> + { + template + struct apply + { + typedef vector0<> type; + }; + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static typename apply::type + call(Iterator) + { + return vector0<>(); + } + }; + +BOOST_FUSION_BARRIER_END +}}} + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_vector" FUSION_MAX_VECTOR_SIZE_STR ".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion { namespace detail +{ +BOOST_FUSION_BARRIER_BEGIN + +#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::next::type \ + BOOST_PP_CAT(I, BOOST_PP_INC(n)); + +#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \ + typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \ + BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n)); + +#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::value_of::type \ + BOOST_PP_CAT(T, n); + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_NEXT_ITERATOR +#undef BOOST_FUSION_NEXT_CALL_ITERATOR +#undef BOOST_FUSION_VALUE_OF_ITERATOR + +BOOST_FUSION_BARRIER_END +}}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + template <> + struct as_vector + { + template + struct apply + { + BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _) + BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _) + typedef BOOST_PP_CAT(vector, N) type; + }; + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static typename apply::type + call(Iterator const& i0) + { + typedef apply gen; + typedef typename gen::type result; + BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _) + return result(BOOST_PP_ENUM_PARAMS(N, *i)); + } + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/vector/limits.hpp b/include/boost/fusion/container/vector/detail/cpp03/limits.hpp similarity index 100% rename from include/boost/fusion/container/vector/limits.hpp rename to include/boost/fusion/container/vector/detail/cpp03/limits.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/as_vector.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector.hpp similarity index 61% rename from include/boost/fusion/container/vector/detail/preprocessed/as_vector.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector.hpp index c70f8a7c..521443ef 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/as_vector.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_VECTOR_SIZE <= 10 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 20 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 30 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 40 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/vector/detail/preprocessed/as_vector10.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector10.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/as_vector10.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector10.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/as_vector20.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector20.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/as_vector20.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector20.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/as_vector30.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector30.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/as_vector30.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector30.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/as_vector40.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector40.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/as_vector40.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector40.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/as_vector50.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector50.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/as_vector50.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector50.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp similarity index 62% rename from include/boost/fusion/container/vector/detail/preprocessed/vector.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp index 040fff94..35b8e643 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_VECTOR_SIZE <= 10 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 20 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 30 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 40 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector10.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector10.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector10_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector10_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector20.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector20.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector20_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector20_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector30.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector30.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector30_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector30_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector40.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector40.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector40_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector40_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector50.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector50.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector50_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector50_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector_chooser.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp similarity index 60% rename from include/boost/fusion/container/vector/detail/preprocessed/vector_chooser.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp index e956bf24..fb8f0e2f 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector_chooser.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp @@ -7,15 +7,15 @@ This is an auto-generated file. Do not edit! ==============================================================================*/ #if FUSION_MAX_VECTOR_SIZE <= 10 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 20 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 30 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 40 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector_chooser10.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector_chooser10.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector_chooser20.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector_chooser20.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector_chooser30.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector_chooser30.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector_chooser40.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector_chooser40.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector_chooser50.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vector_chooser50.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vector_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp similarity index 61% rename from include/boost/fusion/container/vector/detail/preprocessed/vector_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp index e2576f90..42c3f5bc 100644 --- a/include/boost/fusion/container/vector/detail/preprocessed/vector_fwd.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_VECTOR_SIZE <= 10 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 20 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 30 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 40 -#include +#include #elif FUSION_MAX_VECTOR_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector10.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vvector10.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector10_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vvector10_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector20.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vvector20.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector20_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vvector20_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector30.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vvector30.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector30_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vvector30_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector40.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vvector40.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector40_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vvector40_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector50.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vvector50.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp diff --git a/include/boost/fusion/container/vector/detail/preprocessed/vvector50_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/preprocessed/vvector50_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp diff --git a/include/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp b/include/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp new file mode 100644 index 00000000..44feb600 --- /dev/null +++ b/include/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_VALUE_AT_IMPL_05052005_0232) +#define FUSION_VALUE_AT_IMPL_05052005_0232 + +#include +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + + namespace extension + { + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply + { + typedef typename mpl::at::type type; + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/vector/detail/cpp03/vector.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector.hpp new file mode 100644 index 00000000..5dcd6886 --- /dev/null +++ b/include/boost/fusion/container/vector/detail/cpp03/vector.hpp @@ -0,0 +1,247 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_VECTOR_07072005_1244) +#define FUSION_VECTOR_07072005_1244 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define FUSION_HASH # + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) + +#define BOOST_FUSION_VECTOR_COPY_INIT() \ + ctor_helper(rhs, is_base_of()) \ + +#define BOOST_FUSION_VECTOR_CTOR_HELPER() \ + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ + static vector_n const& \ + ctor_helper(vector const& rhs, mpl::true_) \ + { \ + return rhs.vec; \ + } \ + \ + template \ + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ + static T const& \ + ctor_helper(T const& rhs, mpl::false_) \ + { \ + return rhs; \ + } + +#else + +#define BOOST_FUSION_VECTOR_COPY_INIT() \ + rhs \ + +#define BOOST_FUSION_VECTOR_CTOR_HELPER() + +#endif + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vvector" FUSION_MAX_VECTOR_SIZE_STR ".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + struct fusion_sequence_tag; + + template + struct vector + : sequence_base > + { + private: + + typedef typename detail::vector_n_chooser< + BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type + vector_n; + + template + friend struct vector; + + public: + + typedef typename vector_n::types types; + typedef typename vector_n::fusion_tag fusion_tag; + typedef typename vector_n::tag tag; + typedef typename vector_n::size size; + typedef typename vector_n::category category; + typedef typename vector_n::is_view is_view; + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector() + : vec() {} + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector(vector const& rhs) + : vec(rhs.vec) {} + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector(vector const& rhs) + : vec(rhs.vec) {} + + template + BOOST_FUSION_GPU_ENABLED + vector(Sequence const& rhs, + typename boost::enable_if >::type* = 0) + : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} + + // Expand a couple of forwarding constructors for arguments + // of type (T0), (T0, T1), (T0, T1, T2) etc. Example: + // + // vector( + // typename detail::call_param::type arg0 + // , typename detail::call_param::type arg1) + // : vec(arg0, arg1) {} + #include + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector& + operator=(vector const& rhs) + { + vec = rhs.vec; + return *this; + } + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector& + operator=(T const& rhs) + { + vec = rhs; + return *this; + } + + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector& + operator=(vector const& rhs) + { + vec = rhs.vec; + return *this; + } + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +#endif +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ + (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector(vector&& rhs) + : vec(std::forward(rhs.vec)) {} + + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector& + operator=(vector&& rhs) + { + vec = std::forward(rhs.vec); + return *this; + } + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector& + operator=(T&& rhs) + { + vec = BOOST_FUSION_FWD_ELEM(T, rhs); + return *this; + } +#endif +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +FUSION_HASH endif +#endif + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename add_reference< + typename mpl::at_c::type + >::type + at_impl(mpl::int_ index) + { + return vec.at_impl(index); + } + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename add_reference< + typename add_const< + typename mpl::at_c::type + >::type + >::type + at_impl(mpl::int_ index) const + { + return vec.at_impl(index); + } + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename add_reference< + typename mpl::at::type + >::type + at_impl(I /*index*/) + { + return vec.at_impl(mpl::int_()); + } + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename add_reference< + typename add_const< + typename mpl::at::type + >::type + >::type + at_impl(I /*index*/) const + { + return vec.at_impl(mpl::int_()); + } + + private: + + BOOST_FUSION_VECTOR_CTOR_HELPER() + vector_n vec; + }; +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#undef FUSION_HASH +#endif diff --git a/include/boost/fusion/container/vector/detail/cpp03/vector10.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector10.hpp new file mode 100644 index 00000000..58a31dde --- /dev/null +++ b/include/boost/fusion/container/vector/detail/cpp03/vector10.hpp @@ -0,0 +1,105 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_VECTOR10_05042005_0257) +#define FUSION_VECTOR10_05042005_0257 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct vector_tag; + struct fusion_sequence_tag; + struct random_access_traversal_tag; + + template + struct vector0 : sequence_base > + { + typedef mpl::vector0<> types; + typedef vector_tag fusion_tag; + typedef fusion_sequence_tag tag; // this gets picked up by MPL + typedef mpl::false_ is_view; + typedef random_access_traversal_tag category; + typedef mpl::int_<0> size; + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector0() BOOST_NOEXCEPT {} + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector0(Sequence const& /*seq*/) BOOST_NOEXCEPT + {} + }; +}} + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector10.hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct vector_tag; + struct fusion_sequence_tag; + struct random_access_traversal_tag; + +#define FUSION_HASH # +// expand vector1 to vector10 +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, 10) +#include BOOST_PP_ITERATE() +#undef FUSION_HASH +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif diff --git a/include/boost/fusion/container/vector/vector10_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp similarity index 88% rename from include/boost/fusion/container/vector/vector10_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp index ce5cb1e8..d221faec 100644 --- a/include/boost/fusion/container/vector/vector10_fwd.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp @@ -21,10 +21,10 @@ namespace boost { namespace fusion }} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector10_fwd.hpp") +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector10_fwd.hpp") #endif /*============================================================================= @@ -43,7 +43,7 @@ namespace boost { namespace fusion namespace boost { namespace fusion { // expand vector1 to vector10 - #define BOOST_PP_FILENAME_1 + #define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, 10) #include BOOST_PP_ITERATE() }} diff --git a/include/boost/fusion/container/vector/detail/cpp03/vector20.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector20.hpp new file mode 100644 index 00000000..89f644c5 --- /dev/null +++ b/include/boost/fusion/container/vector/detail/cpp03/vector20.hpp @@ -0,0 +1,81 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_VECTOR20_05052005_0205) +#define FUSION_VECTOR20_05052005_0205 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector20.hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct vector_tag; + struct fusion_sequence_tag; + struct random_access_traversal_tag; + +#define FUSION_HASH # +// expand vector11 to vector20 +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (11, 20) +#include BOOST_PP_ITERATE() +#undef FUSION_HASH +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif + diff --git a/include/boost/fusion/container/vector/vector20_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp similarity index 87% rename from include/boost/fusion/container/vector/vector20_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp index bf1b39b4..e69b59f4 100644 --- a/include/boost/fusion/container/vector/vector20_fwd.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp @@ -15,10 +15,10 @@ #include #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector20_fwd.hpp") +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector20_fwd.hpp") #endif /*============================================================================= @@ -38,7 +38,7 @@ namespace boost { namespace fusion { // expand vector11 to vector20 - #define BOOST_PP_FILENAME_1 + #define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (11, 20) #include BOOST_PP_ITERATE() }} diff --git a/include/boost/fusion/container/vector/detail/cpp03/vector30.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector30.hpp new file mode 100644 index 00000000..ad838c9a --- /dev/null +++ b/include/boost/fusion/container/vector/detail/cpp03/vector30.hpp @@ -0,0 +1,80 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_VECTOR30_05052005_0206) +#define FUSION_VECTOR30_05052005_0206 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector30.hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct vector_tag; + struct fusion_sequence_tag; + struct random_access_traversal_tag; + +#define FUSION_HASH # +// expand vector21 to vector30 +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (21, 30) +#include BOOST_PP_ITERATE() +#undef FUSION_HASH +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif + diff --git a/include/boost/fusion/container/vector/vector30_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp similarity index 87% rename from include/boost/fusion/container/vector/vector30_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp index 23b38569..e799b096 100644 --- a/include/boost/fusion/container/vector/vector30_fwd.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp @@ -15,10 +15,10 @@ #include #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector30_fwd.hpp") +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector30_fwd.hpp") #endif /*============================================================================= @@ -38,7 +38,7 @@ namespace boost { namespace fusion { // expand vector21 to vector30 - #define BOOST_PP_FILENAME_1 + #define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (21, 30) #include BOOST_PP_ITERATE() }} diff --git a/include/boost/fusion/container/vector/detail/cpp03/vector40.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector40.hpp new file mode 100644 index 00000000..10770907 --- /dev/null +++ b/include/boost/fusion/container/vector/detail/cpp03/vector40.hpp @@ -0,0 +1,81 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_VECTOR40_05052005_0208) +#define FUSION_VECTOR40_05052005_0208 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector40.hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct vector_tag; + struct fusion_sequence_tag; + struct random_access_traversal_tag; + +#define FUSION_HASH # +// expand vector31 to vector40 +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (31, 40) +#include BOOST_PP_ITERATE() +#undef FUSION_HASH +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif + diff --git a/include/boost/fusion/container/vector/vector40_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp similarity index 87% rename from include/boost/fusion/container/vector/vector40_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp index fc3d29d1..790dd761 100644 --- a/include/boost/fusion/container/vector/vector40_fwd.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp @@ -15,10 +15,10 @@ #include #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector40_fwd.hpp") +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector40_fwd.hpp") #endif /*============================================================================= @@ -38,7 +38,7 @@ namespace boost { namespace fusion { // expand vector31 to vector40 - #define BOOST_PP_FILENAME_1 + #define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (31, 40) #include BOOST_PP_ITERATE() }} diff --git a/include/boost/fusion/container/vector/detail/cpp03/vector50.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector50.hpp new file mode 100644 index 00000000..6c0b48bb --- /dev/null +++ b/include/boost/fusion/container/vector/detail/cpp03/vector50.hpp @@ -0,0 +1,80 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_VECTOR50_05052005_0207) +#define FUSION_VECTOR50_05052005_0207 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector50.hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct vector_tag; + struct fusion_sequence_tag; + struct random_access_traversal_tag; + +#define FUSION_HASH # +// expand vector41 to vector50 +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (41, 50) +#include BOOST_PP_ITERATE() +#undef FUSION_HASH +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif + diff --git a/include/boost/fusion/container/vector/vector50_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp similarity index 87% rename from include/boost/fusion/container/vector/vector50_fwd.hpp rename to include/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp index 52083ad4..4ec5e281 100644 --- a/include/boost/fusion/container/vector/vector50_fwd.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp @@ -15,10 +15,10 @@ #include #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector50_fwd.hpp") +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector50_fwd.hpp") #endif /*============================================================================= @@ -38,7 +38,7 @@ namespace boost { namespace fusion { // expand vector41 to vector50 - #define BOOST_PP_FILENAME_1 + #define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (41, 50) #include BOOST_PP_ITERATE() }} diff --git a/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp similarity index 96% rename from include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp rename to include/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp index 8ec63607..682f0ce3 100644 --- a/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp @@ -11,7 +11,7 @@ #define FUSION_FORWARD_CTOR_FORWARD(z, n, _) BOOST_FUSION_FWD_ELEM(U##n, _##n) #define BOOST_PP_FILENAME_1 \ - + #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp new file mode 100644 index 00000000..f894b1a6 --- /dev/null +++ b/include/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp @@ -0,0 +1,66 @@ +/*============================================================================= + Copyright (c) 1999-2003 Jaakko Jarvi + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_VECTOR_FORWARD_07072005_0125) +#define FUSION_VECTOR_FORWARD_07072005_0125 + +#include +#include +#include + +#include +#if (FUSION_MAX_VECTOR_SIZE > 10) +#include +#endif +#if (FUSION_MAX_VECTOR_SIZE > 20) +#include +#endif +#if (FUSION_MAX_VECTOR_SIZE > 30) +#include +#endif +#if (FUSION_MAX_VECTOR_SIZE > 40) +#include +#endif + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "preprocessed/vvector" FUSION_MAX_VECTOR_SIZE_STR "_fwd.hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename T, void_) + > + struct vector; +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif diff --git a/include/boost/fusion/container/vector/detail/vector_n.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector_n.hpp similarity index 100% rename from include/boost/fusion/container/vector/detail/vector_n.hpp rename to include/boost/fusion/container/vector/detail/cpp03/vector_n.hpp diff --git a/include/boost/fusion/container/vector/detail/vector_n_chooser.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp similarity index 85% rename from include/boost/fusion/container/vector/detail/vector_n_chooser.hpp rename to include/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp index b0e69afc..002889ce 100644 --- a/include/boost/fusion/container/vector/detail/vector_n_chooser.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp @@ -8,21 +8,21 @@ #if !defined(FUSION_VECTOR_N_CHOOSER_07072005_1248) #define FUSION_VECTOR_N_CHOOSER_07072005_1248 -#include +#include // include vector0..N where N is FUSION_MAX_VECTOR_SIZE -#include +#include #if (FUSION_MAX_VECTOR_SIZE > 10) -#include +#include #endif #if (FUSION_MAX_VECTOR_SIZE > 20) -#include +#include #endif #if (FUSION_MAX_VECTOR_SIZE > 30) -#include +#include #endif #if (FUSION_MAX_VECTOR_SIZE > 40) -#include +#include #endif #include @@ -38,7 +38,7 @@ namespace boost { namespace fusion }} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector_chooser" FUSION_MAX_VECTOR_SIZE_STR ".hpp") @@ -72,7 +72,7 @@ namespace boost { namespace fusion { namespace detail }; #define BOOST_PP_FILENAME_1 \ - + #define BOOST_PP_ITERATION_LIMITS (1, BOOST_PP_DEC(FUSION_MAX_VECTOR_SIZE)) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/vector/detail/value_at_impl.hpp b/include/boost/fusion/container/vector/detail/value_at_impl.hpp index 06402b43..f71ca848 100644 --- a/include/boost/fusion/container/vector/detail/value_at_impl.hpp +++ b/include/boost/fusion/container/vector/detail/value_at_impl.hpp @@ -1,34 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_VALUE_AT_IMPL_05052005_0232) -#define FUSION_VALUE_AT_IMPL_05052005_0232 +#ifndef FUSION_VALUE_AT_IMPL_16122014_1641 +#define FUSION_VALUE_AT_IMPL_16122014_1641 +#include #include -#include -namespace boost { namespace fusion -{ - struct vector_tag; - - namespace extension - { - template - struct value_at_impl; - - template <> - struct value_at_impl - { - template - struct apply - { - typedef typename mpl::at::type type; - }; - }; - } -}} +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include #endif + diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index c1cea915..2b9f0ce5 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -1,257 +1,20 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_VECTOR_07072005_1244) -#define FUSION_VECTOR_07072005_1244 +#ifndef FUSION_VECTOR_11052014_1625 +#define FUSION_VECTOR_11052014_1625 -#include -#include -#include +#include #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#define FUSION_HASH # - -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) - -#define BOOST_FUSION_VECTOR_COPY_INIT() \ - ctor_helper(rhs, is_base_of()) \ - -#define BOOST_FUSION_VECTOR_CTOR_HELPER() \ - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ - static vector_n const& \ - ctor_helper(vector const& rhs, mpl::true_) \ - { \ - return rhs.vec; \ - } \ - \ - template \ - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ - static T const& \ - ctor_helper(T const& rhs, mpl::false_) \ - { \ - return rhs; \ - } - -#else - -#define BOOST_FUSION_VECTOR_COPY_INIT() \ - rhs \ - -#define BOOST_FUSION_VECTOR_CTOR_HELPER() +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include #endif -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vvector" FUSION_MAX_VECTOR_SIZE_STR ".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct void_; - struct fusion_sequence_tag; - - template - struct vector - : sequence_base > - { - private: - - typedef typename detail::vector_n_chooser< - BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type - vector_n; - - template - friend struct vector; - - public: - - typedef typename vector_n::types types; - typedef typename vector_n::fusion_tag fusion_tag; - typedef typename vector_n::tag tag; - typedef typename vector_n::size size; - typedef typename vector_n::category category; - typedef typename vector_n::is_view is_view; - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector() - : vec() {} - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector(vector const& rhs) - : vec(rhs.vec) {} - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector(vector const& rhs) - : vec(rhs.vec) {} - - template - // XXX: -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -FUSION_HASH if !defined(BOOST_CLANG) - BOOST_CONSTEXPR -FUSION_HASH endif -#else -#if !defined(BOOST_CLANG) - BOOST_CONSTEXPR -#endif -#endif - BOOST_FUSION_GPU_ENABLED - vector(Sequence const& rhs, - typename boost::enable_if >::type* = 0) - : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} - - // Expand a couple of forwarding constructors for arguments - // of type (T0), (T0, T1), (T0, T1, T2) etc. Example: - // - // vector( - // typename detail::call_param::type arg0 - // , typename detail::call_param::type arg1) - // : vec(arg0, arg1) {} - #include - - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& - operator=(vector const& rhs) - { - vec = rhs.vec; - return *this; - } - - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& - operator=(T const& rhs) - { - vec = rhs; - return *this; - } - - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& - operator=(vector const& rhs) - { - vec = rhs.vec; - return *this; - } - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) -#endif -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ - (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector(vector&& rhs) - : vec(std::forward(rhs.vec)) {} - - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& - operator=(vector&& rhs) - { - vec = std::forward(rhs.vec); - return *this; - } - - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& - operator=(T&& rhs) - { - vec = BOOST_FUSION_FWD_ELEM(T, rhs); - return *this; - } -#endif -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -FUSION_HASH endif -#endif - - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - typename add_reference< - typename mpl::at_c::type - >::type - at_impl(mpl::int_ index) - { - return vec.at_impl(index); - } - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - typename add_reference< - typename add_const< - typename mpl::at_c::type - >::type - >::type - at_impl(mpl::int_ index) const - { - return vec.at_impl(index); - } - - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - typename add_reference< - typename mpl::at::type - >::type - at_impl(I /*index*/) - { - return vec.at_impl(mpl::int_()); - } - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - typename add_reference< - typename add_const< - typename mpl::at::type - >::type - >::type - at_impl(I /*index*/) const - { - return vec.at_impl(mpl::int_()); - } - - private: - - BOOST_FUSION_VECTOR_CTOR_HELPER() - vector_n vec; - }; -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - -#undef FUSION_HASH -#endif diff --git a/include/boost/fusion/container/vector/vector10.hpp b/include/boost/fusion/container/vector/vector10.hpp index a5ef4754..f152bfe1 100644 --- a/include/boost/fusion/container/vector/vector10.hpp +++ b/include/boost/fusion/container/vector/vector10.hpp @@ -1,105 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_VECTOR10_05042005_0257) -#define FUSION_VECTOR10_05042005_0257 +#ifndef FUSION_VECTOR10_11052014_2316 +#define FUSION_VECTOR10_11052014_2316 +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace fusion -{ - struct vector_tag; - struct fusion_sequence_tag; - struct random_access_traversal_tag; - - template - struct vector0 : sequence_base > - { - typedef mpl::vector0<> types; - typedef vector_tag fusion_tag; - typedef fusion_sequence_tag tag; // this gets picked up by MPL - typedef mpl::false_ is_view; - typedef random_access_traversal_tag category; - typedef mpl::int_<0> size; - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector0() BOOST_NOEXCEPT {} - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector0(Sequence const& /*seq*/) BOOST_NOEXCEPT - {} - }; -}} - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector10.hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct vector_tag; - struct fusion_sequence_tag; - struct random_access_traversal_tag; - -#define FUSION_HASH # -// expand vector1 to vector10 -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, 10) -#include BOOST_PP_ITERATE() -#undef FUSION_HASH -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include #endif + diff --git a/include/boost/fusion/container/vector/vector20.hpp b/include/boost/fusion/container/vector/vector20.hpp index 61978dcb..c5be355d 100644 --- a/include/boost/fusion/container/vector/vector20.hpp +++ b/include/boost/fusion/container/vector/vector20.hpp @@ -1,81 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_VECTOR20_05052005_0205) -#define FUSION_VECTOR20_05052005_0205 +#ifndef FUSION_VECTOR20_11052014_2316 +#define FUSION_VECTOR20_11052014_2316 +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector20.hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct vector_tag; - struct fusion_sequence_tag; - struct random_access_traversal_tag; - -#define FUSION_HASH # -// expand vector11 to vector20 -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (11, 20) -#include BOOST_PP_ITERATE() -#undef FUSION_HASH -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include #endif diff --git a/include/boost/fusion/container/vector/vector30.hpp b/include/boost/fusion/container/vector/vector30.hpp index f034abd5..1a528cb5 100644 --- a/include/boost/fusion/container/vector/vector30.hpp +++ b/include/boost/fusion/container/vector/vector30.hpp @@ -1,80 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_VECTOR30_05052005_0206) -#define FUSION_VECTOR30_05052005_0206 +#ifndef FUSION_VECTOR30_11052014_2316 +#define FUSION_VECTOR30_11052014_2316 +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector30.hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct vector_tag; - struct fusion_sequence_tag; - struct random_access_traversal_tag; - -#define FUSION_HASH # -// expand vector21 to vector30 -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (21, 30) -#include BOOST_PP_ITERATE() -#undef FUSION_HASH -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include #endif diff --git a/include/boost/fusion/container/vector/vector40.hpp b/include/boost/fusion/container/vector/vector40.hpp index 5a7bb44c..5faa7d59 100644 --- a/include/boost/fusion/container/vector/vector40.hpp +++ b/include/boost/fusion/container/vector/vector40.hpp @@ -1,81 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_VECTOR40_05052005_0208) -#define FUSION_VECTOR40_05052005_0208 +#ifndef FUSION_VECTOR40_11052014_2316 +#define FUSION_VECTOR40_11052014_2316 +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector40.hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct vector_tag; - struct fusion_sequence_tag; - struct random_access_traversal_tag; - -#define FUSION_HASH # -// expand vector31 to vector40 -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (31, 40) -#include BOOST_PP_ITERATE() -#undef FUSION_HASH -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include #endif diff --git a/include/boost/fusion/container/vector/vector50.hpp b/include/boost/fusion/container/vector/vector50.hpp index 2448d51e..7b7e7a8a 100644 --- a/include/boost/fusion/container/vector/vector50.hpp +++ b/include/boost/fusion/container/vector/vector50.hpp @@ -1,80 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_VECTOR50_05052005_0207) -#define FUSION_VECTOR50_05052005_0207 +#ifndef FUSION_VECTOR50_11052014_2316 +#define FUSION_VECTOR50_11052014_2316 +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector50.hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct vector_tag; - struct fusion_sequence_tag; - struct random_access_traversal_tag; - -#define FUSION_HASH # -// expand vector41 to vector50 -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (41, 50) -#include BOOST_PP_ITERATE() -#undef FUSION_HASH -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include #endif diff --git a/include/boost/fusion/container/vector/vector_fwd.hpp b/include/boost/fusion/container/vector/vector_fwd.hpp index d157ea81..b63099ce 100644 --- a/include/boost/fusion/container/vector/vector_fwd.hpp +++ b/include/boost/fusion/container/vector/vector_fwd.hpp @@ -1,66 +1,19 @@ /*============================================================================= - Copyright (c) 1999-2003 Jaakko Jarvi - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_VECTOR_FORWARD_07072005_0125) -#define FUSION_VECTOR_FORWARD_07072005_0125 +#ifndef FUSION_VECTOR_FORWARD_11052014_1626 +#define FUSION_VECTOR_FORWARD_11052014_1626 +#include #include -#include -#include -#include -#if (FUSION_MAX_VECTOR_SIZE > 10) -#include -#endif -#if (FUSION_MAX_VECTOR_SIZE > 20) -#include -#endif -#if (FUSION_MAX_VECTOR_SIZE > 30) -#include -#endif -#if (FUSION_MAX_VECTOR_SIZE > 40) -#include -#endif - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vvector" FUSION_MAX_VECTOR_SIZE_STR "_fwd.hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct void_; - - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_VECTOR_SIZE, typename T, void_) - > - struct vector; -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// With no variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// +# include #endif + diff --git a/include/boost/fusion/functional/adapter/limits.hpp b/include/boost/fusion/functional/adapter/limits.hpp index 783bc632..cdcdf821 100644 --- a/include/boost/fusion/functional/adapter/limits.hpp +++ b/include/boost/fusion/functional/adapter/limits.hpp @@ -9,7 +9,7 @@ #if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED) # define BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED -# include +# include # if !defined(BOOST_FUSION_UNFUSED_MAX_ARITY) # define BOOST_FUSION_UNFUSED_MAX_ARITY 6 diff --git a/include/boost/fusion/functional/invocation/detail/that_ptr.hpp b/include/boost/fusion/functional/invocation/detail/that_ptr.hpp index 7a1a5c57..33ee93bf 100644 --- a/include/boost/fusion/functional/invocation/detail/that_ptr.hpp +++ b/include/boost/fusion/functional/invocation/detail/that_ptr.hpp @@ -12,7 +12,6 @@ #include #include #include -#include #include namespace boost { namespace fusion { namespace detail @@ -61,10 +60,16 @@ namespace boost { namespace fusion { namespace detail template struct non_const_pointee; - namespace adl_barrier +#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)) +# define BOOST_FUSION_TRAIT_DECL __cdecl +#else +# define BOOST_FUSION_TRAIT_DECL /**/ +#endif + +namespace adl_barrier { using boost::get_pointer; - void const * BOOST_TT_DECL get_pointer(...); // fallback + void const * BOOST_FUSION_TRAIT_DECL get_pointer(...); // fallback template< typename T> char const_tester(T *); template< typename T> long const_tester(T const *); diff --git a/include/boost/fusion/sequence/comparison/less_equal.hpp b/include/boost/fusion/sequence/comparison/less_equal.hpp index 53159926..c5dfa8d5 100644 --- a/include/boost/fusion/sequence/comparison/less_equal.hpp +++ b/include/boost/fusion/sequence/comparison/less_equal.hpp @@ -13,7 +13,6 @@ #include #include #include -#include #if defined(FUSION_DIRECT_OPERATOR_USAGE) #include @@ -38,36 +37,6 @@ namespace boost { namespace fusion namespace operators { -#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1400) -// Workaround for VC8.0 and VC7.1 - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline bool - operator<=(sequence_base const& a, sequence_base const& b) - { - return less_equal(a.derived(), b.derived()); - } - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline typename disable_if, bool>::type - operator<=(sequence_base const& a, Seq2 const& b) - { - return less_equal(a.derived(), b); - } - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline typename disable_if, bool>::type - operator<=(Seq1 const& a, sequence_base const& b) - { - return less_equal(a, b.derived()); - } - -#else -// Somehow VC8.0 and VC7.1 does not like this code -// but barfs somewhere else. - template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED inline typename @@ -79,7 +48,6 @@ namespace boost { namespace fusion { return fusion::less_equal(a, b); } -#endif } using operators::operator<=; }} diff --git a/include/boost/fusion/sequence/intrinsic/at.hpp b/include/boost/fusion/sequence/intrinsic/at.hpp index fdfa72a6..a103e078 100644 --- a/include/boost/fusion/sequence/intrinsic/at.hpp +++ b/include/boost/fusion/sequence/intrinsic/at.hpp @@ -10,12 +10,13 @@ #include #include #include +#include #include #include #include #include #include -#include +#include namespace boost { namespace fusion { @@ -64,7 +65,10 @@ namespace boost { namespace fusion template struct at_impl : mpl::if_< - mpl::less::template apply::type> + mpl::or_< + mpl::less::template apply::type> + , traits::is_unbounded + > , typename extension::at_impl::template apply , mpl::empty_base >::type diff --git a/include/boost/fusion/sequence/intrinsic/at_key.hpp b/include/boost/fusion/sequence/intrinsic/at_key.hpp index 4693a905..9454cb56 100644 --- a/include/boost/fusion/sequence/intrinsic/at_key.hpp +++ b/include/boost/fusion/sequence/intrinsic/at_key.hpp @@ -11,10 +11,15 @@ #include #include #include +#include #include #include #include +#include #include +#include +#include +#include namespace boost { namespace fusion { @@ -64,12 +69,26 @@ namespace boost { namespace fusion struct at_key_impl; } + namespace detail + { + template + struct at_key_impl + : mpl::if_< + mpl::or_< + typename extension::has_key_impl::template apply + , traits::is_unbounded + > + , typename extension::at_key_impl::template apply + , mpl::empty_base + >::type + {}; + } + namespace result_of { template struct at_key - : extension::at_key_impl::type>:: - template apply + : detail::at_key_impl::type> {}; } diff --git a/include/boost/fusion/sequence/intrinsic/value_at.hpp b/include/boost/fusion/sequence/intrinsic/value_at.hpp index 362669b5..152f0c94 100644 --- a/include/boost/fusion/sequence/intrinsic/value_at.hpp +++ b/include/boost/fusion/sequence/intrinsic/value_at.hpp @@ -9,8 +9,13 @@ #include #include +#include +#include +#include +#include #include #include +#include namespace boost { namespace fusion { @@ -50,12 +55,26 @@ namespace boost { namespace fusion struct value_at_impl; } + namespace detail + { + template + struct value_at_impl + : mpl::if_< + mpl::or_< + mpl::less::template apply::type> + , traits::is_unbounded + > + , typename extension::value_at_impl::template apply + , mpl::empty_base + >::type + {}; + } + namespace result_of { template struct value_at - : extension::value_at_impl::type>:: - template apply + : detail::value_at_impl::type> {}; template diff --git a/include/boost/fusion/sequence/intrinsic/value_at_key.hpp b/include/boost/fusion/sequence/intrinsic/value_at_key.hpp index 6d8be3fb..76baf1b8 100644 --- a/include/boost/fusion/sequence/intrinsic/value_at_key.hpp +++ b/include/boost/fusion/sequence/intrinsic/value_at_key.hpp @@ -10,10 +10,15 @@ #include #include +#include +#include +#include #include +#include #include #include #include +#include namespace boost { namespace fusion { @@ -52,13 +57,27 @@ namespace boost { namespace fusion template <> struct value_at_key_impl; } - + + namespace detail + { + template + struct value_at_key_impl + : mpl::if_< + mpl::or_< + typename extension::has_key_impl::template apply + , traits::is_unbounded + > + , typename extension::value_at_key_impl::template apply + , mpl::empty_base + >::type + {}; + } + namespace result_of { template struct value_at_key - : extension::value_at_key_impl::type>:: - template apply + : detail::value_at_key_impl::type> {}; } }} diff --git a/include/boost/fusion/support/category_of.hpp b/include/boost/fusion/support/category_of.hpp index 6bdf6d02..92b0ea1b 100644 --- a/include/boost/fusion/support/category_of.hpp +++ b/include/boost/fusion/support/category_of.hpp @@ -36,6 +36,8 @@ namespace boost { namespace fusion struct associative_tag {}; + struct unbounded_tag {}; + namespace extension { template @@ -107,6 +109,13 @@ namespace boost { namespace fusion random_access_traversal_tag , typename category_of::type> {}; + + template + struct is_unbounded + : is_base_of< + unbounded_tag + , typename category_of::type> + {}; } }} diff --git a/include/boost/fusion/support/config.hpp b/include/boost/fusion/support/config.hpp index 10dc29df..1ce042a8 100644 --- a/include/boost/fusion/support/config.hpp +++ b/include/boost/fusion/support/config.hpp @@ -2,7 +2,7 @@ Copyright (c) 2014 Eric Niebler Copyright (c) 2014 Kohei Takahashi - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under 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) ==============================================================================*/ #if !defined(FUSION_SUPPORT_CONFIG_01092014_1718) @@ -10,6 +10,7 @@ #include #include +#include #ifndef BOOST_FUSION_GPU_ENABLED #define BOOST_FUSION_GPU_ENABLED BOOST_GPU_ENABLED @@ -78,7 +79,7 @@ namespace boost { namespace fusion { namespace detail // - MSVC 10.0 implements iterator intrinsics; MSVC 13.0 implements LWG2408. #if (defined(BOOST_LIBSTDCXX_VERSION) && (BOOST_LIBSTDCXX_VERSION < 40500) && \ defined(BOOST_LIBSTDCXX11)) || \ - (defined(BOOST_MSVC) && (1600 <= BOOST_MSVC || BOOST_MSVC < 1900)) + (defined(BOOST_MSVC) && (1600 <= BOOST_MSVC && BOOST_MSVC < 1900)) # define BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { diff --git a/include/boost/fusion/support/detail/index_sequence.hpp b/include/boost/fusion/support/detail/index_sequence.hpp new file mode 100644 index 00000000..1b596e72 --- /dev/null +++ b/include/boost/fusion/support/detail/index_sequence.hpp @@ -0,0 +1,59 @@ +/*============================================================================= + Copyright (c) 2015 Agustin K-ballo Berge + Copyright (c) 2015 Kohei Takahashi + + Distributed under 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) +==============================================================================*/ + +#ifndef BOOST_FUSION_SUPPORT_DETAIL_INDEX_SEQUENCE_06232015_1038 +#define BOOST_FUSION_SUPPORT_DETAIL_INDEX_SEQUENCE_06232015_1038 + +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template + struct index_sequence + { + typedef std::size_t value_type; + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static std::size_t size() BOOST_NOEXCEPT + { return sizeof...(Ints); } + + // non standard extension + typedef index_sequence type; + }; + + template + struct _make_index_sequence_join; + + template + struct _make_index_sequence_join< + index_sequence, index_sequence + > : index_sequence + {}; + + template + struct make_index_sequence + : _make_index_sequence_join< + typename make_index_sequence::type + , typename make_index_sequence::type + > + {}; + + template <> + struct make_index_sequence<1> + : index_sequence<0> + {}; + + template <> + struct make_index_sequence<0> + : index_sequence<> + {}; +}}} + +#endif + diff --git a/include/boost/fusion/support/pair.hpp b/include/boost/fusion/support/pair.hpp index fd5d57e6..a4cd1ff0 100644 --- a/include/boost/fusion/support/pair.hpp +++ b/include/boost/fusion/support/pair.hpp @@ -49,7 +49,7 @@ namespace boost { namespace fusion #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED pair(Second2&& val , typename boost::disable_if >::type* /* dummy */ = 0 , typename boost::enable_if >::type* /*dummy*/ = 0 diff --git a/include/boost/fusion/tuple/detail/make_tuple.hpp b/include/boost/fusion/tuple/detail/make_tuple.hpp new file mode 100644 index 00000000..abacb0bf --- /dev/null +++ b/include/boost/fusion/tuple/detail/make_tuple.hpp @@ -0,0 +1,86 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_MAKE_TUPLE_10032005_0843) +#define FUSION_MAKE_TUPLE_10032005_0843 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + BOOST_FUSION_GPU_ENABLED inline tuple<> + make_tuple() + { + return tuple<>(); + } +}} + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_tuple" FUSION_MAX_VECTOR_SIZE_STR ".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename detail::as_fusion_element::type + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_AS_FUSION_ELEMENT + +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + template + BOOST_FUSION_GPU_ENABLED + inline tuple + make_tuple(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) + { + return tuple( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/tuple/detail/tuple.hpp b/include/boost/fusion/tuple/detail/tuple.hpp new file mode 100644 index 00000000..f9270687 --- /dev/null +++ b/include/boost/fusion/tuple/detail/tuple.hpp @@ -0,0 +1,122 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_TUPLE_10032005_0810) +#define FUSION_TUPLE_10032005_0810 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/tuple" FUSION_MAX_VECTOR_SIZE_STR ".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + template + struct tuple : vector + { + typedef vector< + BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> + base_type; + + BOOST_FUSION_GPU_ENABLED tuple() + : base_type() {} + + BOOST_FUSION_GPU_ENABLED tuple(tuple const& rhs) + : base_type(rhs) {} + + template + BOOST_FUSION_GPU_ENABLED + tuple(std::pair const& rhs) + : base_type(rhs) {} + + #include + + template + BOOST_FUSION_GPU_ENABLED + tuple& operator=(T const& rhs) + { + base_type::operator=(rhs); + return *this; + } + + BOOST_FUSION_GPU_ENABLED + tuple& operator=(tuple const& rhs) + { + base_type::operator=(rhs); + return *this; + } + + template + BOOST_FUSION_GPU_ENABLED + tuple& operator=(std::pair const& rhs) + { + base_type::operator=(rhs); + return *this; + } + }; + + template + struct tuple_size : result_of::size {}; + + template + struct tuple_element : result_of::value_at_c {}; + + template + BOOST_FUSION_GPU_ENABLED + inline typename + lazy_disable_if< + is_const + , result_of::at_c + >::type + get(Tuple& tup) + { + return at_c(tup); + } + + template + BOOST_FUSION_GPU_ENABLED + inline typename result_of::at_c::type + get(Tuple const& tup) + { + return at_c(tup); + } +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif + diff --git a/include/boost/fusion/tuple/detail/tuple_fwd.hpp b/include/boost/fusion/tuple/detail/tuple_fwd.hpp new file mode 100644 index 00000000..2b52183a --- /dev/null +++ b/include/boost/fusion/tuple/detail/tuple_fwd.hpp @@ -0,0 +1,52 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#if !defined(FUSION_TUPLE_FORWARD_10032005_0956) +#define FUSION_TUPLE_FORWARD_10032005_0956 + +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/tuple" FUSION_MAX_VECTOR_SIZE_STR "_fwd.hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ + struct void_; + + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename T, void_) + > + struct tuple; +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif + diff --git a/include/boost/fusion/tuple/detail/tuple_tie.hpp b/include/boost/fusion/tuple/detail/tuple_tie.hpp new file mode 100644 index 00000000..7ecbfe17 --- /dev/null +++ b/include/boost/fusion/tuple/detail/tuple_tie.hpp @@ -0,0 +1,76 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(FUSION_TUPLE_TIE_10032005_0846) +#define FUSION_TUPLE_TIE_10032005_0846 + +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/tuple_tie" FUSION_MAX_VECTOR_SIZE_STR ".hpp") +#endif + +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under 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) + + This is an auto-generated file. Do not edit! +==============================================================================*/ + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 1) +#endif + +namespace boost { namespace fusion +{ +#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_REF + +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + template + BOOST_FUSION_GPU_ENABLED + inline tuple + tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) + { + return tuple( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/tuple/make_tuple.hpp b/include/boost/fusion/tuple/make_tuple.hpp index 93034834..0d127736 100644 --- a/include/boost/fusion/tuple/make_tuple.hpp +++ b/include/boost/fusion/tuple/make_tuple.hpp @@ -1,86 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_MAKE_TUPLE_10032005_0843) -#define FUSION_MAKE_TUPLE_10032005_0843 +#ifndef FUSION_MAKE_TUPLE_14122014_0048 +#define FUSION_MAKE_TUPLE_14122014_0048 -#include -#include -#include -#include -#include +#include +#include -namespace boost { namespace fusion -{ - BOOST_FUSION_GPU_ENABLED inline tuple<> - make_tuple() - { - return tuple<>(); - } -}} - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_tuple" FUSION_MAX_VECTOR_SIZE_STR ".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ -#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ - typename detail::as_fusion_element::type - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_AS_FUSION_ELEMENT - -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - -#endif -#else // defined(BOOST_PP_IS_ITERATING) /////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// +// With no variadics, we will use the C++03 version /////////////////////////////////////////////////////////////////////////////// +# include -#define N BOOST_PP_ITERATION() - - template - BOOST_FUSION_GPU_ENABLED - inline tuple - make_tuple(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) - { - return tuple( - BOOST_PP_ENUM_PARAMS(N, arg)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) +#endif diff --git a/include/boost/fusion/tuple/tuple.hpp b/include/boost/fusion/tuple/tuple.hpp index 953f2b66..674c3691 100644 --- a/include/boost/fusion/tuple/tuple.hpp +++ b/include/boost/fusion/tuple/tuple.hpp @@ -1,122 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_TUPLE_10032005_0810) -#define FUSION_TUPLE_10032005_0810 +#ifndef FUSION_TUPLE_14122014_0102 +#define FUSION_TUPLE_14122014_0102 #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/tuple" FUSION_MAX_VECTOR_SIZE_STR ".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - template - struct tuple : vector - { - typedef vector< - BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> - base_type; - - BOOST_FUSION_GPU_ENABLED tuple() - : base_type() {} - - BOOST_FUSION_GPU_ENABLED tuple(tuple const& rhs) - : base_type(rhs) {} - - template - BOOST_FUSION_GPU_ENABLED - tuple(std::pair const& rhs) - : base_type(rhs) {} - - #include - - template - BOOST_FUSION_GPU_ENABLED - tuple& operator=(T const& rhs) - { - base_type::operator=(rhs); - return *this; - } - - BOOST_FUSION_GPU_ENABLED - tuple& operator=(tuple const& rhs) - { - base_type::operator=(rhs); - return *this; - } - - template - BOOST_FUSION_GPU_ENABLED - tuple& operator=(std::pair const& rhs) - { - base_type::operator=(rhs); - return *this; - } - }; - - template - struct tuple_size : result_of::size {}; - - template - struct tuple_element : result_of::value_at_c {}; - - template - BOOST_FUSION_GPU_ENABLED - inline typename - lazy_disable_if< - is_const - , result_of::at_c - >::type - get(Tuple& tup) - { - return at_c(tup); - } - - template - BOOST_FUSION_GPU_ENABLED - inline typename result_of::at_c::type - get(Tuple const& tup) - { - return at_c(tup); - } -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// With no variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// +# include #endif diff --git a/include/boost/fusion/tuple/tuple_fwd.hpp b/include/boost/fusion/tuple/tuple_fwd.hpp index 68969183..07420234 100644 --- a/include/boost/fusion/tuple/tuple_fwd.hpp +++ b/include/boost/fusion/tuple/tuple_fwd.hpp @@ -1,52 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#if !defined(FUSION_TUPLE_FORWARD_10032005_0956) -#define FUSION_TUPLE_FORWARD_10032005_0956 +#ifndef FUSION_TUPLE_FORWARD_14122014_0051 +#define FUSION_TUPLE_FORWARD_14122014_0051 +#include #include -#include -#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/tuple" FUSION_MAX_VECTOR_SIZE_STR "_fwd.hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct void_; - - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_VECTOR_SIZE, typename T, void_) - > - struct tuple; -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// With no variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// +# include #endif diff --git a/include/boost/fusion/tuple/tuple_tie.hpp b/include/boost/fusion/tuple/tuple_tie.hpp index 19050287..92028070 100644 --- a/include/boost/fusion/tuple/tuple_tie.hpp +++ b/include/boost/fusion/tuple/tuple_tie.hpp @@ -1,76 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_TUPLE_TIE_10032005_0846) -#define FUSION_TUPLE_TIE_10032005_0846 +#ifndef FUSION_TUPLE_TIE_14122014_0115 +#define FUSION_TUPLE_TIE_14122014_0115 -#include -#include -#include -#include -#include +#include +#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/tuple_tie" FUSION_MAX_VECTOR_SIZE_STR ".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under 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) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ -#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)& - -#define BOOST_PP_FILENAME_1 -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_REF - -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - -#endif -#else // defined(BOOST_PP_IS_ITERATING) /////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// +// With no variadics, we will use the C++03 version /////////////////////////////////////////////////////////////////////////////// +# include -#define N BOOST_PP_ITERATION() - - template - BOOST_FUSION_GPU_ENABLED - inline tuple - tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) - { - return tuple( - BOOST_PP_ENUM_PARAMS(N, arg)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) +#endif diff --git a/include/boost/fusion/view/nview/detail/cpp03/nview_impl.hpp b/include/boost/fusion/view/nview/detail/cpp03/nview_impl.hpp new file mode 100644 index 00000000..08c6c9d7 --- /dev/null +++ b/include/boost/fusion/view/nview/detail/cpp03/nview_impl.hpp @@ -0,0 +1,78 @@ +/*============================================================================= + Copyright (c) 2009 Hartmut Kaiser + + Distributed under 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) +==============================================================================*/ + +#ifndef BOOST_PP_IS_ITERATING + +#if !defined(BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM) +#define BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM + +#include +#include +#include +#include +#include +#include +#include + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, FUSION_MAX_VECTOR_SIZE, \ + "boost/fusion/view/nview/detail/cpp03/nview_impl.hpp")) \ + /**/ + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace fusion { namespace result_of +{ + template + struct as_nview + { + typedef mpl::vector_c< + int, BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, I) + > index_type; + typedef nview type; + }; +}}} + +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// Preprocessor vertical repetition code +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + +#if N < FUSION_MAX_VECTOR_SIZE +namespace boost { namespace fusion { namespace result_of +{ + template + struct as_nview + { + typedef mpl::vector_c index_type; + typedef nview type; + }; +}}} +#endif + +namespace boost { namespace fusion +{ + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline nview > + as_nview(Sequence& s) + { + typedef mpl::vector_c index_type; + return nview(s); + } + +}} + +#undef N + +#endif diff --git a/include/boost/fusion/view/nview/detail/nview_impl.hpp b/include/boost/fusion/view/nview/detail/nview_impl.hpp index e0d93356..40674e35 100644 --- a/include/boost/fusion/view/nview/detail/nview_impl.hpp +++ b/include/boost/fusion/view/nview/detail/nview_impl.hpp @@ -1,78 +1,18 @@ /*============================================================================= - Copyright (c) 2009 Hartmut Kaiser + Copyright (c) 2014 Kohei Takahashi Distributed under 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) ==============================================================================*/ +#ifndef BOOST_FUSION_NVIEW_IMPL_17122014_1948 +#define BOOST_FUSION_NVIEW_IMPL_17122014_1948 -#ifndef BOOST_PP_IS_ITERATING - -#if !defined(BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM) -#define BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM - -#include -#include -#include -#include -#include -#include -#include - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, FUSION_MAX_VECTOR_SIZE, \ - "boost/fusion/view/nview/detail/nview_impl.hpp")) \ - /**/ +#include /////////////////////////////////////////////////////////////////////////////// -namespace boost { namespace fusion { namespace result_of -{ - template - struct as_nview - { - typedef mpl::vector_c< - int, BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, I) - > index_type; - typedef nview type; - }; -}}} - -#include BOOST_PP_ITERATE() +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include #endif -/////////////////////////////////////////////////////////////////////////////// -// Preprocessor vertical repetition code -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - -#if N < FUSION_MAX_VECTOR_SIZE -namespace boost { namespace fusion { namespace result_of -{ - template - struct as_nview - { - typedef mpl::vector_c index_type; - typedef nview type; - }; -}}} -#endif - -namespace boost { namespace fusion -{ - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline nview > - as_nview(Sequence& s) - { - typedef mpl::vector_c index_type; - return nview(s); - } - -}} - -#undef N - -#endif diff --git a/test/Jamfile b/test/Jamfile index 752a798a..87b4bf51 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -78,6 +78,7 @@ project [ run sequence/list_make.cpp : : : : ] [ run sequence/list_misc.cpp : : : : ] [ run sequence/list_mutate.cpp : : : : ] + [ run sequence/list_nest.cpp : : : : ] [ run sequence/list_tie.cpp : : : : ] [ run sequence/list_value_at.cpp : : : : ] [ run sequence/deque_comparison.cpp : : : : ] @@ -89,6 +90,7 @@ project [ run sequence/deque_misc.cpp : : : : ] [ run sequence/deque_move.cpp : : : : ] [ run sequence/deque_mutate.cpp : : : : ] + [ run sequence/deque_nest.cpp : : : : ] [ run sequence/deque_tie.cpp : : : : ] [ run sequence/deque_value_at.cpp : : : : ] [ run sequence/front_extended_deque.cpp : : : : ] @@ -131,6 +133,7 @@ project [ run sequence/vector_move.cpp : : : : ] [ run sequence/vector_mutate.cpp : : : : ] [ run sequence/vector_n.cpp : : : : ] + [ run sequence/vector_nest.cpp : : : : ] [ run sequence/vector_hash.cpp : : : : ] [ run sequence/vector_tie.cpp : : : : ] [ run sequence/vector_value_at.cpp : : : : ] @@ -184,6 +187,8 @@ project [ compile support/pair_map.cpp : : : : ] [ compile support/pair_set.cpp : : : : ] [ compile support/pair_vector.cpp : : : : ] + [ compile support/pair_nest.cpp : : : : ] + [ compile support/index_sequence.cpp : : : : ] # [ compile-fail xxx.cpp : : : : ] diff --git a/test/algorithm/pop_back.cpp b/test/algorithm/pop_back.cpp index b594f6c8..5e45e779 100644 --- a/test/algorithm/pop_back.cpp +++ b/test/algorithm/pop_back.cpp @@ -65,8 +65,8 @@ main() std::cout << pop_back(sv) << std::endl; // Compile check only - begin(pop_back(sv)) == end(sv); - end(pop_back(sv)) == begin(sv); + (void)(begin(pop_back(sv)) == end(sv)); + (void)(end(pop_back(sv)) == begin(sv)); } // $$$ JDG: TODO add compile fail facility $$$ diff --git a/test/sequence/adapt_adt.cpp b/test/sequence/adapt_adt.cpp index 265cfca5..bf5d4ca0 100644 --- a/test/sequence/adapt_adt.cpp +++ b/test/sequence/adapt_adt.cpp @@ -149,6 +149,9 @@ namespace ns #endif +class empty_adt{}; +BOOST_FUSION_ADAPT_ADT(empty_adt,) + int main() { diff --git a/test/sequence/adapt_adt_named.cpp b/test/sequence/adapt_adt_named.cpp index 8924ce41..f7e115aa 100644 --- a/test/sequence/adapt_adt_named.cpp +++ b/test/sequence/adapt_adt_named.cpp @@ -77,6 +77,10 @@ BOOST_FUSION_ADAPT_ADT_NAMED( #endif // BOOST_PP_VARIADICS + +class empty_adt{}; +BOOST_FUSION_ADAPT_ADT_NAMED(empty_adt,renamed_empty_adt,) + int main() { diff --git a/test/sequence/adapt_assoc_adt.cpp b/test/sequence/adapt_assoc_adt.cpp index a03605f1..fca3941d 100644 --- a/test/sequence/adapt_assoc_adt.cpp +++ b/test/sequence/adapt_assoc_adt.cpp @@ -70,6 +70,9 @@ BOOST_FUSION_ADAPT_ASSOC_ADT( #endif +class empty_adt{}; +BOOST_FUSION_ADAPT_ASSOC_ADT(empty_adt,) + int main() { diff --git a/test/sequence/adapt_assoc_adt_named.cpp b/test/sequence/adapt_assoc_adt_named.cpp index 8ef9aa27..d685528d 100644 --- a/test/sequence/adapt_assoc_adt_named.cpp +++ b/test/sequence/adapt_assoc_adt_named.cpp @@ -52,6 +52,9 @@ BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED( (int, int, obj.get_y(), obj.set_y(val), ns::y_member) ) +class empty_adt{}; +BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED(empty_adt, renamed_empty_adt,) + int main() { diff --git a/test/sequence/adapt_assoc_struct.cpp b/test/sequence/adapt_assoc_struct.cpp index 4cdabb87..6bb4a8ee 100644 --- a/test/sequence/adapt_assoc_struct.cpp +++ b/test/sequence/adapt_assoc_struct.cpp @@ -71,6 +71,9 @@ namespace ns #endif +struct empty_struct {}; +BOOST_FUSION_ADAPT_ASSOC_STRUCT(empty_struct,); + int main() { diff --git a/test/sequence/adapt_assoc_struct_named.cpp b/test/sequence/adapt_assoc_struct_named.cpp index f24dadd9..fd7fdc50 100644 --- a/test/sequence/adapt_assoc_struct_named.cpp +++ b/test/sequence/adapt_assoc_struct_named.cpp @@ -38,6 +38,9 @@ BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED( (int, y, ns::y_member) ) +struct empty_struct {}; +BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED(empty_struct, renamed_empty_struct,); + int main() { diff --git a/test/sequence/adapt_assoc_tpl_adt.cpp b/test/sequence/adapt_assoc_tpl_adt.cpp index 8aa600ff..e0b89dca 100644 --- a/test/sequence/adapt_assoc_tpl_adt.cpp +++ b/test/sequence/adapt_assoc_tpl_adt.cpp @@ -71,6 +71,20 @@ BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( #endif +template +class empty_adt_templated_factory { + + TypeToConstruct operator()() { + return TypeToConstruct(); + } + +}; + +BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( + (TypeToConstruct), + (empty_adt_templated_factory)(TypeToConstruct), +) + int main() { diff --git a/test/sequence/adapt_assoc_tpl_struct.cpp b/test/sequence/adapt_assoc_tpl_struct.cpp index 6adcc931..a949dad0 100644 --- a/test/sequence/adapt_assoc_tpl_struct.cpp +++ b/test/sequence/adapt_assoc_tpl_struct.cpp @@ -69,6 +69,20 @@ namespace ns ) #endif +template +struct empty_struct_templated_factory { + + TypeToConstruct operator()() { + return TypeToConstruct(); + } + +}; + +BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( + (TypeToConstruct), + (empty_struct_templated_factory)(TypeToConstruct), +) + int main() { diff --git a/test/sequence/adapt_struct.cpp b/test/sequence/adapt_struct.cpp index 121827f5..e4c8f6ee 100644 --- a/test/sequence/adapt_struct.cpp +++ b/test/sequence/adapt_struct.cpp @@ -149,6 +149,9 @@ namespace ns #endif +struct empty_struct {}; +BOOST_FUSION_ADAPT_STRUCT(empty_struct,) + int main() { diff --git a/test/sequence/adapt_struct_named.cpp b/test/sequence/adapt_struct_named.cpp index aab11d2d..63fc3f5f 100644 --- a/test/sequence/adapt_struct_named.cpp +++ b/test/sequence/adapt_struct_named.cpp @@ -71,6 +71,10 @@ namespace ns #endif +struct empty_struct {}; +BOOST_FUSION_ADAPT_STRUCT_NAMED(empty_struct, renamed_empty_struct, ) +BOOST_FUSION_ADAPT_STRUCT_NAMED_NS(empty_struct, (ns1), renamed_empty_struct1, ) + int main() { diff --git a/test/sequence/adapt_tpl_adt.cpp b/test/sequence/adapt_tpl_adt.cpp index bbd1d07f..c454baa5 100644 --- a/test/sequence/adapt_tpl_adt.cpp +++ b/test/sequence/adapt_tpl_adt.cpp @@ -79,6 +79,20 @@ namespace ns ) #endif +template +class empty_adt_templated_factory { + + TypeToConstruct operator()() { + return TypeToConstruct(); + } + +}; + +BOOST_FUSION_ADAPT_TPL_ADT( + (TypeToConstruct), + (empty_adt_templated_factory)(TypeToConstruct), +) + int main() { diff --git a/test/sequence/adapt_tpl_struct.cpp b/test/sequence/adapt_tpl_struct.cpp index 86face6d..861bab65 100644 --- a/test/sequence/adapt_tpl_struct.cpp +++ b/test/sequence/adapt_tpl_struct.cpp @@ -69,6 +69,19 @@ namespace ns #endif +template +struct empty_struct_templated_factory { + + TypeToConstruct operator()() { + return TypeToConstruct(); + } + +}; + +BOOST_FUSION_ADAPT_TPL_STRUCT( + (TypeToConstruct), + (empty_struct_templated_factory)(TypeToConstruct), +) int main() diff --git a/test/sequence/define_struct.cpp b/test/sequence/define_struct.cpp index 63b5a19d..d91dda95 100644 --- a/test/sequence/define_struct.cpp +++ b/test/sequence/define_struct.cpp @@ -24,6 +24,13 @@ BOOST_FUSION_DEFINE_STRUCT( (int, y) ) +// Tutorial (compile test only) +BOOST_FUSION_DEFINE_STRUCT( + (demo), employee, + (std::string, name) + (int, age) +) + BOOST_FUSION_DEFINE_STRUCT(BOOST_PP_EMPTY(), s, (int, m)) // Testing non-constexpr compatible types @@ -118,4 +125,3 @@ main() return boost::report_errors(); } - diff --git a/test/sequence/deque_nest.cpp b/test/sequence/deque_nest.cpp new file mode 100644 index 00000000..6f70ee9a --- /dev/null +++ b/test/sequence/deque_nest.cpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (C) 2015 Kohei Takahshi + + Distributed under 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) +==============================================================================*/ +#include +#include + +#define FUSION_SEQUENCE deque +#include "nest.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/test/sequence/iterator.hpp b/test/sequence/iterator.hpp index d9ef5e0f..d543f8eb 100644 --- a/test/sequence/iterator.hpp +++ b/test/sequence/iterator.hpp @@ -164,9 +164,11 @@ void test() BOOST_STATIC_ASSERT((is_same::type, int&>::value)); BOOST_STATIC_ASSERT((is_same::type, char&>::value)); + BOOST_STATIC_ASSERT((is_same::type, char&>::value)); BOOST_STATIC_ASSERT((is_same::type, int>::value)); BOOST_STATIC_ASSERT((is_same::type, char&>::value)); + BOOST_STATIC_ASSERT((is_same::type, char&>::value)); } { // Testing advance diff --git a/test/sequence/list_nest.cpp b/test/sequence/list_nest.cpp new file mode 100644 index 00000000..ff97b807 --- /dev/null +++ b/test/sequence/list_nest.cpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (C) 2015 Kohei Takahshi + + Distributed under 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) +==============================================================================*/ +#include +#include + +#define FUSION_SEQUENCE list +#include "nest.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/test/sequence/map.cpp b/test/sequence/map.cpp index 8dada167..5a130f8b 100644 --- a/test/sequence/map.cpp +++ b/test/sequence/map.cpp @@ -111,6 +111,7 @@ main() pair a = at_c<0>(m); (void) a; pair b = at_c<1>(m); pair c = at_c<2>(m); + (void)c; } // iterators & random access interface. @@ -154,6 +155,7 @@ main() // make sure that the correct constructor is called pair p1; pair p2 = p1; + (void)p2; } { diff --git a/test/sequence/nest.hpp b/test/sequence/nest.hpp new file mode 100644 index 00000000..e8087320 --- /dev/null +++ b/test/sequence/nest.hpp @@ -0,0 +1,58 @@ +/*============================================================================= + Copyright (C) 2015 Kohei Takahshi + + Distributed under 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) +==============================================================================*/ + +#include +#include + +template +void test_copy() +{ + C src; + C dst = src; + (void)dst; +} + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template +void test_move() +{ + C src; + C dst = std::move(src); + (void)dst; +} +#endif + +template +void test_all() +{ + test_copy(); +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + test_move(); +#endif +} + +void +test() +{ + using namespace boost::fusion; + + test_all > >(); + test_all, int> >(); + test_all > >(); + test_all, float> >(); + + test_all > >(); + test_all, int> >(); + test_all > >(); + test_all, float> >(); + + test_all > >(); + test_all, int> >(); + test_all > >(); + test_all, float> >(); +} + diff --git a/test/sequence/vector_nest.cpp b/test/sequence/vector_nest.cpp new file mode 100644 index 00000000..a0cb76c6 --- /dev/null +++ b/test/sequence/vector_nest.cpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (C) 2015 Kohei Takahshi + + Distributed under 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) +==============================================================================*/ +#include +#include + +#define FUSION_SEQUENCE vector +#include "nest.hpp" + +int +main() +{ + test(); + return boost::report_errors(); +} + diff --git a/test/support/index_sequence.cpp b/test/support/index_sequence.cpp new file mode 100644 index 00000000..f155a8c7 --- /dev/null +++ b/test/support/index_sequence.cpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2015 Kohei Takahashi + + Distributed under 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) +==============================================================================*/ +#include + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + +#include +#include +#include + +using namespace boost::fusion; + +BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<> >)); +BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0> >)); +BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0, 1> >)); +BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0, 1, 2> >)); +BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0, 1, 2, 3> >)); +BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0, 1, 2, 3, 4> >)); +BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0, 1, 2, 3, 4, 5> >)); +BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0, 1, 2, 3, 4, 5, 6> >)); +BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0, 1, 2, 3, 4, 5, 6, 7> >)); + +BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14> >)); +BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15> >)); +BOOST_MPL_ASSERT((boost::is_same::type, detail::index_sequence<0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16> >)); + +#endif + diff --git a/test/support/pair_nest.cpp b/test/support/pair_nest.cpp new file mode 100644 index 00000000..fbc253cb --- /dev/null +++ b/test/support/pair_nest.cpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2015 Kohei Takahashi + + Distributed under 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) +==============================================================================*/ +#include +#include + +using namespace boost::fusion; + +template +void copy() +{ + pair src; + pair dest = src; + boost::ignore_unused(dest); +} + +int main() +{ + copy >(); +} +