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/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/adapted/struct/detail/define_struct_inline.hpp b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp index a5a3ae06..a037ffe5 100644 --- a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -66,7 +66,7 @@ #define BOOST_FUSION_IGNORE_2(ARG1, ARG2) #define BOOST_FUSION_MAKE_COPY_CONSTRUCTOR(NAME, ATTRIBUTES_SEQ) \ - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ + BOOST_FUSION_GPU_ENABLED \ NAME(BOOST_PP_SEQ_FOR_EACH_I( \ BOOST_FUSION_MAKE_CONST_REF_PARAM, \ ~, \ @@ -337,7 +337,7 @@ typedef boost::mpl::int_ index; \ typedef boost_fusion_detail_Seq sequence_type; \ \ - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ + BOOST_FUSION_GPU_ENABLED \ BOOST_FUSION_ITERATOR_NAME(NAME)(boost_fusion_detail_Seq& seq) \ : seq_(seq) \ BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES( \ 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/algorithm/transformation/erase.hpp b/include/boost/fusion/algorithm/transformation/erase.hpp index 0f3b8a15..8eebc357 100644 --- a/include/boost/fusion/algorithm/transformation/erase.hpp +++ b/include/boost/fusion/algorithm/transformation/erase.hpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/include/boost/fusion/algorithm/transformation/insert.hpp b/include/boost/fusion/algorithm/transformation/insert.hpp index 44e59653..c6d5219d 100644 --- a/include/boost/fusion/algorithm/transformation/insert.hpp +++ b/include/boost/fusion/algorithm/transformation/insert.hpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/include/boost/fusion/algorithm/transformation/insert_range.hpp b/include/boost/fusion/algorithm/transformation/insert_range.hpp index 40e64e1f..57878309 100644 --- a/include/boost/fusion/algorithm/transformation/insert_range.hpp +++ b/include/boost/fusion/algorithm/transformation/insert_range.hpp @@ -9,7 +9,6 @@ #include #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..561677f9 --- /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..afc0ab2f 100644 --- a/include/boost/fusion/container/generation/list_tie.hpp +++ b/include/boost/fusion/container/generation/list_tie.hpp @@ -1,102 +1,16 @@ /*============================================================================= - 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 -#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 - -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 +# 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 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/make_list.hpp b/include/boost/fusion/container/generation/make_list.hpp index 8cfc7e62..0aafb272 100644 --- a/include/boost/fusion/container/generation/make_list.hpp +++ b/include/boost/fusion/container/generation/make_list.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_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 -#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 - - 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 +# 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_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/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..cd3b992b 100644 --- a/include/boost/fusion/container/generation/make_vector.hpp +++ b/include/boost/fusion/container/generation/make_vector.hpp @@ -1,115 +1,75 @@ /*============================================================================= - 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) ==============================================================================*/ -#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 +#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# 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 +/////////////////////////////////////////////////////////////////////////////// +// 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 +#include +#include +#include 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<> + template + struct make_vector { - typedef vector0<> type; + // make `make_vector' into `make_vector' + template struct trim_void; + + template + struct trim_void > + { + typedef vector type; + }; + + template + struct trim_void, void_, Tail...> + : trim_void > { }; + + template + struct trim_void, Head, Tail...> + : trim_void, Tail...> { }; + + typedef + typename trim_void< + vector<> + , typename detail::as_fusion_element< + typename remove_const< + typename remove_reference::type + >::type + >::type... + >::type + type; }; } + template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline vector0<> - make_vector() + inline typename result_of::make_vector::type + make_vector(T&&... arg) { - return vector0<>(); + return typename result_of::make_vector::type(std::forward(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_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) +#endif diff --git a/include/boost/fusion/container/generation/vector_tie.hpp b/include/boost/fusion/container/generation/vector_tie.hpp index 28efa3bd..5d7cb98b 100644 --- a/include/boost/fusion/container/generation/vector_tie.hpp +++ b/include/boost/fusion/container/generation/vector_tie.hpp @@ -1,100 +1,44 @@ /*============================================================================= - 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 +#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# 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 +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic interface +/////////////////////////////////////////////////////////////////////////////// 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 + template + struct vector_tie { - typedef vector type; + typedef vector type; }; } - template + template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline vector - vector_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) + inline vector + vector_tie(T&... arg) { - return vector( - BOOST_PP_ENUM_PARAMS(N, arg)); + return vector(arg...); } + }} -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) + +#endif +#endif 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..d649068a 100644 --- a/include/boost/fusion/container/list/cons.hpp +++ b/include/boost/fusion/container/list/cons.hpp @@ -73,7 +73,7 @@ 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< 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..41b3caff --- /dev/null +++ b/include/boost/fusion/container/list/detail/cpp03/list.hpp @@ -0,0 +1,103 @@ +/*============================================================================= + 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; + + 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) {} + + 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 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 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 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 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 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..e967c892 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,18 @@ /*============================================================================= - 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_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 -#define FUSION_VOID(z, n, _) void_ +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include -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/list.hpp b/include/boost/fusion/container/list/list.hpp index 5b584131..b07f0fc9 100644 --- a/include/boost/fusion/container/list/list.hpp +++ b/include/boost/fusion/container/list/list.hpp @@ -1,103 +1,18 @@ /*============================================================================= - 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_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 -#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 - -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; - - 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) {} - - template - BOOST_CONSTEXPR 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 +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include #endif diff --git a/include/boost/fusion/container/list/list_fwd.hpp b/include/boost/fusion/container/list/list_fwd.hpp index d827d283..d7ea0dcd 100644 --- a/include/boost/fusion/container/list/list_fwd.hpp +++ b/include/boost/fusion/container/list/list_fwd.hpp @@ -1,51 +1,18 @@ /*============================================================================= - 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 -#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") -#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 +/////////////////////////////////////////////////////////////////////////////// +// With no variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// +# include #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..41c98033 100644 --- a/include/boost/fusion/container/vector.hpp +++ b/include/boost/fusion/container/vector.hpp @@ -8,25 +8,8 @@ #define FUSION_SEQUENCE_CLASS_VECTOR_10022005_0602 #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 - -#include #include -#include +#include #include #endif diff --git a/include/boost/fusion/container/vector/detail/as_vector.hpp b/include/boost/fusion/container/vector/detail/as_vector.hpp index b5f5e2d0..e2f45b6a 100644 --- a/include/boost/fusion/container/vector/detail/as_vector.hpp +++ b/include/boost/fusion/container/vector/detail/as_vector.hpp @@ -1,139 +1,70 @@ /*============================================================================= - 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) ==============================================================================*/ -#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 + +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# include +#else + +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#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_impl; - template <> - struct as_vector<0> + template + struct as_vector_impl > { template struct apply { - typedef vector0<> type; + typedef vector< + typename result_of::value_of< + typename result_of::advance_c::type + >::type... + > type; }; template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static typename apply::type - call(Iterator) + call(Iterator i) { - return vector0<>(); + typedef typename apply::type result; + return result(*advance_c(i)...); } }; + template + struct as_vector + : as_vector_impl::type> {}; + 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 #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/detail/at_impl.hpp b/include/boost/fusion/container/vector/detail/at_impl.hpp index cb98dd4a..a2900d79 100644 --- a/include/boost/fusion/container/vector/detail/at_impl.hpp +++ b/include/boost/fusion/container/vector/detail/at_impl.hpp @@ -9,9 +9,8 @@ #include #include -#include -#include -#include +#include +#include namespace boost { namespace fusion { @@ -28,7 +27,7 @@ namespace boost { namespace fusion template struct apply { - typedef typename mpl::at::type element; + typedef typename value_at_impl::template apply::type element; typedef typename detail::ref_result::type type; BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED @@ -43,7 +42,7 @@ namespace boost { namespace fusion template struct apply { - typedef typename mpl::at::type element; + typedef typename value_at_impl::template apply::type element; typedef typename detail::cref_result::type type; BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED diff --git a/include/boost/fusion/container/vector/detail/config.hpp b/include/boost/fusion/container/vector/detail/config.hpp new file mode 100644 index 00000000..475fe641 --- /dev/null +++ b/include/boost/fusion/container/vector/detail/config.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + 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) +==============================================================================*/ +#ifndef FUSION_VECTOR_CONFIG_11052014_1720 +#define FUSION_VECTOR_CONFIG_11052014_1720 + +#include +#include +#include + +#if (defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \ + || defined(BOOST_NO_CXX11_RVALUE_REFERENCES) \ + || defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)) \ + || (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) +# if defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# undef BOOST_FUSION_HAS_VARIADIC_VECTOR +# endif +#else +# if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# define BOOST_FUSION_HAS_VARIADIC_VECTOR +# endif +#endif + +// Sometimes, MSVC 12 shows compile error with std::size_t of template parameter. +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800)) +# if defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# undef BOOST_FUSION_HAS_VARIADIC_VECTOR +# endif +#endif + +#endif + 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 95% rename from include/boost/fusion/container/vector/limits.hpp rename to include/boost/fusion/container/vector/detail/cpp03/limits.hpp index 6e106144..74a05102 100644 --- a/include/boost/fusion/container/vector/limits.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/limits.hpp @@ -9,6 +9,7 @@ #include #include +#include #if !defined(FUSION_MAX_VECTOR_SIZE) # define FUSION_MAX_VECTOR_SIZE 10 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/deref_impl.hpp b/include/boost/fusion/container/vector/detail/deref_impl.hpp index 5186aa10..c85bb82b 100644 --- a/include/boost/fusion/container/vector/detail/deref_impl.hpp +++ b/include/boost/fusion/container/vector/detail/deref_impl.hpp @@ -8,8 +8,8 @@ #define FUSION_DEREF_IMPL_05042005_1037 #include -#include #include +#include #include #include @@ -30,9 +30,7 @@ namespace boost { namespace fusion { typedef typename Iterator::vector vector; typedef typename Iterator::index index; - typedef typename mpl::at< - typename vector::types, index>::type - element; + typedef typename value_at_impl::template apply::type element; typedef typename mpl::if_< 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..220807c7 100644 --- a/include/boost/fusion/container/vector/detail/value_at_impl.hpp +++ b/include/boost/fusion/container/vector/detail/value_at_impl.hpp @@ -1,19 +1,39 @@ /*============================================================================= - 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 +#include + +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# include +#else + +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include +#include namespace boost { namespace fusion { struct vector_tag; + namespace vector_detail + { + template + struct vector_data; + } + namespace extension { template @@ -22,13 +42,27 @@ namespace boost { namespace fusion template <> struct value_at_impl { - template - struct apply + template + struct apply_impl; + + template + struct apply_impl, 0> { - typedef typename mpl::at::type type; + typedef H type; }; + + template + struct apply_impl, N> + : apply_impl, N - 1> + {}; + + template + struct apply : apply_impl + {}; }; } }} #endif +#endif + diff --git a/include/boost/fusion/container/vector/detail/value_of_impl.hpp b/include/boost/fusion/container/vector/detail/value_of_impl.hpp index 2a8acf91..d67ab3fc 100644 --- a/include/boost/fusion/container/vector/detail/value_of_impl.hpp +++ b/include/boost/fusion/container/vector/detail/value_of_impl.hpp @@ -8,7 +8,7 @@ #define FUSION_VALUE_OF_IMPL_05052005_1128 #include -#include +#include namespace boost { namespace fusion { @@ -27,9 +27,7 @@ namespace boost { namespace fusion { typedef typename Iterator::vector vector; typedef typename Iterator::index index; - typedef typename mpl::at< - typename vector::types, index>::type - type; + typedef typename value_at_impl::template apply::type type; }; }; } diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index c1cea915..ab1c1f04 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -1,257 +1,318 @@ /*============================================================================= - 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_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 + +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# include +#else + +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#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() - -#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 +#include +#include +#include +#include +#include +#include +#include namespace boost { namespace fusion { - struct void_; - struct fusion_sequence_tag; + struct vector_tag; + struct random_access_traversal_tag; - template - struct vector - : sequence_base > + namespace vector_detail { - private: + struct each_elem {}; + struct copy_or_move {}; + template struct from_sequence {}; - typedef typename detail::vector_n_chooser< - BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type - vector_n; + template + struct make_indices_from_seq + : detail::make_index_sequence< + fusion::result_of::size::type>::value + > + {}; - template - friend struct vector; + template + struct pure : remove_cv::type> {}; - public: + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline each_elem + dispatch( T const&... ) BOOST_NOEXCEPT { return each_elem(); } - 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; + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline copy_or_move + dispatch( This const& ) BOOST_NOEXCEPT { return copy_or_move(); } + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline from_sequence< + typename lazy_enable_if_c< + (traits::is_sequence::value && + !is_same::value) + , make_indices_from_seq + >::type + > + dispatch( Sequence const& ) BOOST_NOEXCEPT + { return from_sequence::type>(); } + + + // forward_at_c allows to access Nth element even if ForwardSequence + // since fusion::at_c requires RandomAccessSequence. + namespace result_of + { + template + struct forward_at_c + : fusion::result_of::deref< + typename fusion::result_of::advance_c< + typename fusion::result_of::begin< + typename remove_reference::type + >::type + , N + >::type + > + {}; + } + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline typename result_of::forward_at_c::type + forward_at_c(Sequence&& seq) + { + typedef typename + result_of::forward_at_c::type + result; + return std::forward(*advance_c(begin(seq))); + } + + // Object proxy since preserve object order + template + struct store + { + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + store() + : elem() // value-initialized explicitly + {} + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + store(store const& rhs) + : elem(rhs.get()) + {} + + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + store& + operator=(store const& rhs) + { + elem = rhs.get(); + return *this; + } + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + store(store&& rhs) + : elem(static_cast(rhs.get())) + {} + + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + store& + operator=(store&& rhs) + { + elem = static_cast(rhs.get()); + return *this; + } + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + store(U&& rhs + , typename disable_if::type, store> >::type* = 0) + : elem(std::forward(rhs)) + {} + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename disable_if::type, store>, store&>::type + operator=(U&& rhs) + { + elem = std::forward(rhs); + return *this; + } + + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + T & get() { return elem; } + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + T const& get() const { return elem; } + + T elem; + }; + + template + struct vector_data; + + template + struct vector_data, T...> + : store... + , sequence_base, T...> > + { + 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_ size; + typedef vector type_sequence; + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector_data() + {} + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector_data(copy_or_move, vector_data const& rhs) + : store(static_cast const&>(rhs))... + {} + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector_data(copy_or_move, vector_data&& rhs) + : store(std::forward >(rhs))... + {} + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + explicit + vector_data(from_sequence >, Sequence&& rhs) + : store(forward_at_c(rhs))... + {} + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + explicit + vector_data(each_elem, U&&... var) + : store(std::forward(var))... + {} + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + void + assign(Sequence&&, detail::index_sequence<>) {} + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + void + assign(Sequence&& seq, detail::index_sequence) + { + at_impl(mpl::int_()) = vector_detail::forward_at_c(seq); + assign(std::forward(seq), detail::index_sequence()); + } + + typedef extension::value_at_impl value_at_impl; + + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename value_at_impl::template apply::type& + at_impl(J) + { + typedef typename value_at_impl::template apply::type U; + typedef store S; + return static_cast(this)->get(); + } + + template + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename value_at_impl::template apply::type const& + at_impl(J) const + { + typedef typename value_at_impl::template apply::type U; + typedef store S; + return static_cast(this)->get(); + } + }; + + template + struct trim_void_; + + template + struct trim_void_ > + { + typedef vector_data< + typename detail::make_index_sequence::type + , T... + > type; + }; + + template + struct trim_void_, void_, Tail...> + : trim_void_ > {}; + + template + struct trim_void_, Head, Tail...> + : trim_void_, Tail...> {}; + + template + struct trim_void : trim_void_, T...> {}; + } // namespace boost::fusion::vector_detail + + // This class provides backward compatibility: vector. + template + struct vector + : vector_detail::trim_void::type + { + typedef typename vector_detail::trim_void::type base; 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) {} + // rvalue-references is required here in order to forward any arguments to + // base: vector(T const&...) doesn't work with trailing void_ and + // vector(U const&...) cannot forward any arguments to base. + template + // XXX: constexpr become error due to pull-request #79, booooo!! + // In the (near) future release, should be fixed. + /* BOOST_CONSTEXPR */ BOOST_FUSION_GPU_ENABLED + vector(U&&... u) + : base(vector_detail::dispatch(u...), std::forward(u)...) + {} 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) + operator=(Sequence&& rhs) { - vec = rhs.vec; + typedef typename + vector_detail::make_indices_from_seq::type + indices; + base::assign(std::forward(rhs), indices()); 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 -#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..65722fe6 100644 --- a/include/boost/fusion/container/vector/vector10.hpp +++ b/include/boost/fusion/container/vector/vector10.hpp @@ -1,105 +1,29 @@ /*============================================================================= - 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 -#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 +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# 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 +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include +#include #endif +#endif + diff --git a/include/boost/fusion/container/vector/vector20.hpp b/include/boost/fusion/container/vector/vector20.hpp index 61978dcb..c36e50c7 100644 --- a/include/boost/fusion/container/vector/vector20.hpp +++ b/include/boost/fusion/container/vector/vector20.hpp @@ -1,81 +1,29 @@ /*============================================================================= - 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 -#include - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# 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 +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include +#include #endif +#endif diff --git a/include/boost/fusion/container/vector/vector30.hpp b/include/boost/fusion/container/vector/vector30.hpp index f034abd5..e9f891f2 100644 --- a/include/boost/fusion/container/vector/vector30.hpp +++ b/include/boost/fusion/container/vector/vector30.hpp @@ -1,80 +1,29 @@ /*============================================================================= - 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 -#include - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# 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 +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include +#include #endif +#endif diff --git a/include/boost/fusion/container/vector/vector40.hpp b/include/boost/fusion/container/vector/vector40.hpp index 5a7bb44c..4b753a08 100644 --- a/include/boost/fusion/container/vector/vector40.hpp +++ b/include/boost/fusion/container/vector/vector40.hpp @@ -1,81 +1,29 @@ /*============================================================================= - 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 -#include - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# 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 +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include +#include #endif +#endif diff --git a/include/boost/fusion/container/vector/vector50.hpp b/include/boost/fusion/container/vector/vector50.hpp index 2448d51e..5d8d3563 100644 --- a/include/boost/fusion/container/vector/vector50.hpp +++ b/include/boost/fusion/container/vector/vector50.hpp @@ -1,80 +1,29 @@ /*============================================================================= - 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 -#include - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# 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 +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include +#include #endif +#endif diff --git a/include/boost/fusion/container/vector/vector_fwd.hpp b/include/boost/fusion/container/vector/vector_fwd.hpp index d157ea81..dcb0a0fc 100644 --- a/include/boost/fusion/container/vector/vector_fwd.hpp +++ b/include/boost/fusion/container/vector/vector_fwd.hpp @@ -1,66 +1,43 @@ /*============================================================================= - Copyright (c) 1999-2003 Jaakko Jarvi - 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_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 -#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 +/////////////////////////////////////////////////////////////////////////////// +// With no variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# 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 +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include +#include namespace boost { namespace fusion { - struct void_; - - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_VECTOR_SIZE, typename T, void_) - > + template struct vector; + +#define FUSION_VECTOR_N_ALIASES(z, N, d) \ + template \ + using BOOST_PP_CAT(vector, N) = vector; + + BOOST_PP_REPEAT(51, FUSION_VECTOR_N_ALIASES, ~) + +#undef FUSION_VECTOR_N_ALIASES }} -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) +#endif #endif -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - -#endif diff --git a/include/boost/fusion/functional/adapter/limits.hpp b/include/boost/fusion/functional/adapter/limits.hpp index 783bc632..9fb5a2a2 100644 --- a/include/boost/fusion/functional/adapter/limits.hpp +++ b/include/boost/fusion/functional/adapter/limits.hpp @@ -9,16 +9,21 @@ #if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED) # define BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED -# include +# include +# if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) +# include +# endif # if !defined(BOOST_FUSION_UNFUSED_MAX_ARITY) # define BOOST_FUSION_UNFUSED_MAX_ARITY 6 -# elif BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE +# elif !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) && \ + (BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE) # error "BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE" # endif # if !defined(BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY) # define BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY 6 -# elif BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE +# elif !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) && \ + (BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE) # error "BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE" # endif 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/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 c0cd3049..e4c8f6ee 100644 --- a/test/sequence/adapt_struct.cpp +++ b/test/sequence/adapt_struct.cpp @@ -67,6 +67,17 @@ namespace ns foo foo_; int y; }; + + + // Testing non-constexpr compatible types + struct employee { + std::string name; + std::string nickname; + + employee(std::string name, std::string nickname) + : name(name), nickname(nickname) + {} + }; } #if BOOST_PP_VARIADICS @@ -96,6 +107,13 @@ namespace ns y ) + BOOST_FUSION_ADAPT_STRUCT( + ns::employee, + name, + nickname + ) + + #else // BOOST_PP_VARIADICS BOOST_FUSION_ADAPT_STRUCT( @@ -123,8 +141,17 @@ namespace ns (BOOST_FUSION_ADAPT_AUTO, y) ) + BOOST_FUSION_ADAPT_STRUCT( + ns::employee, + (std::string, name) + (BOOST_FUSION_ADAPT_AUTO, nickname) + ) + #endif +struct empty_struct {}; +BOOST_FUSION_ADAPT_STRUCT(empty_struct,) + int main() { @@ -224,6 +251,15 @@ main() BOOST_TEST(v2 >= v1); } + { + ns::employee emp("John Doe", "jdoe"); + std::cout << at_c<0>(emp) << std::endl; + std::cout << at_c<1>(emp) << std::endl; + + fusion::vector v1("John Doe", "jdoe"); + BOOST_TEST(emp == v1); + } + return boost::report_errors(); } 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 cd65ad09..d91dda95 100644 --- a/test/sequence/define_struct.cpp +++ b/test/sequence/define_struct.cpp @@ -33,6 +33,14 @@ BOOST_FUSION_DEFINE_STRUCT( BOOST_FUSION_DEFINE_STRUCT(BOOST_PP_EMPTY(), s, (int, m)) +// Testing non-constexpr compatible types +BOOST_FUSION_DEFINE_STRUCT( + (ns), + employee, + (std::string, name) + (std::string, nickname) +) + int main() { @@ -107,5 +115,13 @@ main() BOOST_TEST(p == make_vector(3,5)); } + { + ns::employee emp = make_list("John Doe", "jdoe"); + std::cout << at_c<0>(emp) << std::endl; + std::cout << at_c<1>(emp) << std::endl; + + BOOST_TEST(emp == make_vector("John Doe", "jdoe")); + } + return boost::report_errors(); } diff --git a/test/sequence/define_struct_inline.cpp b/test/sequence/define_struct_inline.cpp index e849ce9b..d34a142b 100644 --- a/test/sequence/define_struct_inline.cpp +++ b/test/sequence/define_struct_inline.cpp @@ -41,6 +41,13 @@ namespace ns BOOST_FUSION_DEFINE_STRUCT_INLINE(s, (int, m)) BOOST_FUSION_DEFINE_STRUCT_INLINE(empty_struct, ) + + // Testing non-constexpr compatible types + BOOST_FUSION_DEFINE_STRUCT_INLINE( + employee, + (std::string, name) + (std::string, nickname) + ) } template @@ -128,6 +135,17 @@ main() { run_test(); // test with non-template enclosing class run_test::point>(); // test with template enclosing class + + { + using namespace boost::fusion; + + ns::employee emp = make_list("John Doe", "jdoe"); + std::cout << at_c<0>(emp) << std::endl; + std::cout << at_c<1>(emp) << std::endl; + + BOOST_TEST(emp == make_vector("John Doe", "jdoe")); + } + 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 >(); +} +