diff options
Diffstat (limited to 'boost/fusion')
179 files changed, 3087 insertions, 2322 deletions
diff --git a/boost/fusion/adapted/std_tuple/detail/build_std_tuple.hpp b/boost/fusion/adapted/std_tuple/detail/build_std_tuple.hpp index 41e0d434e8..b60dc76fcc 100644 --- a/boost/fusion/adapted/std_tuple/detail/build_std_tuple.hpp +++ b/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 <boost/mpl/eval_if.hpp> -#include <boost/mpl/identity.hpp> #include <boost/fusion/support/config.hpp> +#include <boost/fusion/support/detail/index_sequence.hpp> #include <boost/fusion/iterator/equal_to.hpp> #include <boost/fusion/iterator/next.hpp> #include <boost/fusion/iterator/value_of.hpp> #include <boost/fusion/iterator/deref.hpp> #include <tuple> +#include <cstddef> namespace boost { namespace fusion { namespace detail { - template <typename First, typename Last - , bool is_empty = result_of::equal_to<First, Last>::value - > + template <typename First, typename Last, + bool is_empty = result_of::equal_to<First, Last>::value> struct build_std_tuple; template <typename First, typename Last> struct build_std_tuple<First, Last, true> { 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 <int ...> struct indexed_tuple { }; - - template <int, typename = indexed_tuple<>> - struct make_indexed_tuple; - - template <int Head, int ...Tail> - struct make_indexed_tuple<Head, indexed_tuple<Tail...>> - { - typedef typename - boost::mpl::eval_if_c< - (Head == 0), - boost::mpl::identity<indexed_tuple<Tail...>>, - make_indexed_tuple<Head - 1, indexed_tuple<Head - 1, Tail...>> - >::type - type; - }; - template <typename T, typename Rest> struct push_front_std_tuple; template <typename T, typename ...Rest> - struct push_front_std_tuple<T, std::tuple<Rest...>> + struct push_front_std_tuple<T, std::tuple<Rest...> > { typedef std::tuple<T, Rest...> type; - template <int ...I> + template <std::size_t ...I> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type - indexed_call(T const& first, std::tuple<Rest...> const& rest, indexed_tuple<I...>) + indexed_call(T const& first, std::tuple<Rest...> const& rest, index_sequence<I...>) { return type(first, std::get<I>(rest)...); } @@ -72,7 +55,7 @@ namespace boost { namespace fusion { namespace detail static type call(T const& first, std::tuple<Rest...> const& rest) { - typedef typename make_indexed_tuple<sizeof...(Rest)>::type gen; + typedef typename make_index_sequence<sizeof...(Rest)>::type gen; return indexed_call(first, rest, gen()); } }; diff --git a/boost/fusion/adapted/struct/adapt_struct.hpp b/boost/fusion/adapted/struct/adapt_struct.hpp index e96e7c76d2..2744f5b218 100644 --- a/boost/fusion/adapted/struct/adapt_struct.hpp +++ b/boost/fusion/adapted/struct/adapt_struct.hpp @@ -17,6 +17,8 @@ #include <boost/preprocessor/control/if.hpp> #include <boost/preprocessor/comparison/less.hpp> #include <boost/preprocessor/comparison/equal.hpp> +#include <boost/preprocessor/seq/seq.hpp> +#include <boost/preprocessor/variadic/to_seq.hpp> #include <boost/type_traits/add_reference.hpp> #include <boost/type_traits/is_const.hpp> #include <boost/type_traits/add_const.hpp> @@ -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/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp b/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp index 69d5b204ce..7a83bb347c 100644 --- a/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp +++ b/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/boost/fusion/adapted/struct/detail/define_struct.hpp b/boost/fusion/adapted/struct/detail/define_struct.hpp index 25542920ad..ce3737ea97 100644 --- a/boost/fusion/adapted/struct/detail/define_struct.hpp +++ b/boost/fusion/adapted/struct/detail/define_struct.hpp @@ -69,7 +69,7 @@ ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ \ template<typename Seq> \ - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ + BOOST_FUSION_GPU_ENABLED \ self_type& \ operator=(Seq const& seq) \ { \ @@ -128,7 +128,7 @@ ATTRIBUTE_TUPEL_SIZE, \ ATTRIBUTES_SEQ) \ \ - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ + BOOST_FUSION_GPU_ENABLED \ NAME() \ : BOOST_PP_SEQ_FOR_EACH_I_R( \ 1, \ @@ -137,7 +137,7 @@ ATTRIBUTES_SEQ) \ {} \ \ - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ + BOOST_FUSION_GPU_ENABLED \ NAME(self_type const& other_self) \ : BOOST_PP_SEQ_FOR_EACH_I_R( \ 1, \ @@ -147,7 +147,7 @@ {} \ \ template<typename Seq> \ - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ + BOOST_FUSION_GPU_ENABLED \ NAME(Seq const& seq \ BOOST_PP_IF( \ BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \ @@ -167,7 +167,7 @@ #define BOOST_FUSION_DEFINE_STRUCT_CTOR_1( \ NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ \ - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ + BOOST_FUSION_GPU_ENABLED \ explicit \ NAME(boost::call_traits< \ BOOST_PP_TUPLE_ELEM( \ @@ -180,7 +180,7 @@ #define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_1( \ TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ \ - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ + BOOST_FUSION_GPU_ENABLED \ explicit \ NAME(typename boost::call_traits< \ typename boost::fusion::detail::get_first_arg< \ @@ -217,7 +217,7 @@ #define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_N( \ TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ \ - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ + BOOST_FUSION_GPU_ENABLED \ NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \ 1, \ BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_ARG_I, \ @@ -245,7 +245,7 @@ #define BOOST_FUSION_DEFINE_STRUCT_CTOR_N( \ NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ \ - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ + BOOST_FUSION_GPU_ENABLED \ NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \ 1, \ BOOST_FUSION_DEFINE_STRUCT_CTOR_ARG_I, \ diff --git a/boost/fusion/adapted/struct/detail/define_struct_inline.hpp b/boost/fusion/adapted/struct/detail/define_struct_inline.hpp index a5a3ae0628..a037ffe549 100644 --- a/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/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_<N> 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/boost/fusion/algorithm/iteration/reverse_fold.hpp b/boost/fusion/algorithm/iteration/reverse_fold.hpp index 76e6bf2575..dffff79e14 100644 --- a/boost/fusion/algorithm/iteration/reverse_fold.hpp +++ b/boost/fusion/algorithm/iteration/reverse_fold.hpp @@ -10,6 +10,7 @@ #define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_FOLD_HPP #include <boost/fusion/support/config.hpp> +#include <boost/fusion/support/detail/result_of.hpp> #include <boost/fusion/algorithm/iteration/reverse_fold_fwd.hpp> #include <boost/config.hpp> #include <boost/fusion/sequence/intrinsic/begin.hpp> diff --git a/boost/fusion/algorithm/iteration/reverse_iter_fold.hpp b/boost/fusion/algorithm/iteration/reverse_iter_fold.hpp index e49f8b8310..d36861f37b 100644 --- a/boost/fusion/algorithm/iteration/reverse_iter_fold.hpp +++ b/boost/fusion/algorithm/iteration/reverse_iter_fold.hpp @@ -9,6 +9,7 @@ #define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_ITER_FOLD_HPP #include <boost/fusion/support/config.hpp> +#include <boost/fusion/support/detail/result_of.hpp> #include <boost/fusion/algorithm/iteration/reverse_iter_fold_fwd.hpp> #include <boost/config.hpp> #include <boost/fusion/sequence/intrinsic/begin.hpp> diff --git a/boost/fusion/container/deque/detail/cpp03/deque.hpp b/boost/fusion/container/deque/detail/cpp03/deque.hpp index 7c9417e53b..db8a967ab0 100644 --- a/boost/fusion/container/deque/detail/cpp03/deque.hpp +++ b/boost/fusion/container/deque/detail/cpp03/deque.hpp @@ -94,13 +94,13 @@ namespace boost { namespace fusion { {} template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& seq) : base(seq) {} template<typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::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 <typename T0_> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 , typename enable_if<is_convertible<T0_, T0> >::type* /*dummy*/ = 0 ) @@ -140,7 +140,7 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) : base(std::forward<deque>(rhs)) {} template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& seq , typename disable_if< is_convertible<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>, T0> diff --git a/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp b/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp index 21b4934546..fcbd74a7e9 100644 --- a/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp +++ b/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp @@ -24,7 +24,6 @@ #include <boost/mpl/plus.hpp> #include <boost/mpl/int.hpp> -#include <boost/mpl/print.hpp> #define FUSION_VOID(z, n, _) void_ diff --git a/boost/fusion/container/deque/detail/cpp03/limits.hpp b/boost/fusion/container/deque/detail/cpp03/limits.hpp index 7892ba1a82..16e25fa081 100644 --- a/boost/fusion/container/deque/detail/cpp03/limits.hpp +++ b/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 <boost/fusion/container/vector/limits.hpp> +#include <boost/fusion/container/vector/detail/cpp03/limits.hpp> #if !defined(FUSION_MAX_DEQUE_SIZE) # define FUSION_MAX_DEQUE_SIZE FUSION_MAX_VECTOR_SIZE diff --git a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp index 7f71696143..ae1828a5f7 100644 --- a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp +++ b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp @@ -195,12 +195,12 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ : base(rhs) {} template<typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9> const& seq) : base(seq) {} template<typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* = 0) : base(base::from_iterator(fusion::begin(seq))) {} @@ -222,7 +222,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ } # if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template <typename T0_> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 , typename enable_if<is_convertible<T0_, T0> >::type* = 0 ) @@ -233,7 +233,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ : base(std::forward<deque>(rhs)) {} template<typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9>&& seq , typename disable_if< is_convertible<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9>, T0> diff --git a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp index 949b2a4590..78224634bb 100644 --- a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp +++ b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp @@ -375,12 +375,12 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ : base(rhs) {} template<typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19> const& seq) : base(seq) {} template<typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* = 0) : base(base::from_iterator(fusion::begin(seq))) {} @@ -402,7 +402,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ } # if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template <typename T0_> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 , typename enable_if<is_convertible<T0_, T0> >::type* = 0 ) @@ -413,7 +413,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ : base(std::forward<deque>(rhs)) {} template<typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19>&& seq , typename disable_if< is_convertible<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19>, T0> diff --git a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp index 65a9264d86..8653217bc0 100644 --- a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp +++ b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp @@ -555,12 +555,12 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ : base(rhs) {} template<typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29> const& seq) : base(seq) {} template<typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* = 0) : base(base::from_iterator(fusion::begin(seq))) {} @@ -582,7 +582,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ } # if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template <typename T0_> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 , typename enable_if<is_convertible<T0_, T0> >::type* = 0 ) @@ -593,7 +593,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ : base(std::forward<deque>(rhs)) {} template<typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29>&& seq , typename disable_if< is_convertible<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29>, T0> diff --git a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp index 13bf4213c1..3bfd488af2 100644 --- a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp +++ b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp @@ -735,12 +735,12 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ : base(rhs) {} template<typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33 , typename U34 , typename U35 , typename U36 , typename U37 , typename U38 , typename U39> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39> const& seq) : base(seq) {} template<typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* = 0) : base(base::from_iterator(fusion::begin(seq))) {} @@ -762,7 +762,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ } # if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template <typename T0_> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 , typename enable_if<is_convertible<T0_, T0> >::type* = 0 ) @@ -773,7 +773,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ : base(std::forward<deque>(rhs)) {} template<typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33 , typename U34 , typename U35 , typename U36 , typename U37 , typename U38 , typename U39> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39>&& seq , typename disable_if< is_convertible<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39>, T0> diff --git a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp index 51ae53d2a5..04441da66c 100644 --- a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp +++ b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp @@ -915,12 +915,12 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ : base(rhs) {} template<typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33 , typename U34 , typename U35 , typename U36 , typename U37 , typename U38 , typename U39 , typename U40 , typename U41 , typename U42 , typename U43 , typename U44 , typename U45 , typename U46 , typename U47 , typename U48 , typename U49> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39 , U40 , U41 , U42 , U43 , U44 , U45 , U46 , U47 , U48 , U49> const& seq) : base(seq) {} template<typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* = 0) : base(base::from_iterator(fusion::begin(seq))) {} @@ -942,7 +942,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ } # if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template <typename T0_> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 , typename enable_if<is_convertible<T0_, T0> >::type* = 0 ) @@ -953,7 +953,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ : base(std::forward<deque>(rhs)) {} template<typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33 , typename U34 , typename U35 , typename U36 , typename U37 , typename U38 , typename U39 , typename U40 , typename U41 , typename U42 , typename U43 , typename U44 , typename U45 , typename U46 , typename U47 , typename U48 , typename U49> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39 , U40 , U41 , U42 , U43 , U44 , U45 , U46 , U47 , U48 , U49>&& seq , typename disable_if< is_convertible<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39 , U40 , U41 , U42 , U43 , U44 , U45 , U46 , U47 , U48 , U49>, T0> diff --git a/boost/fusion/container/generation/detail/pp_list_tie.hpp b/boost/fusion/container/generation/detail/pp_list_tie.hpp new file mode 100644 index 0000000000..be25627ae8 --- /dev/null +++ b/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 <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/fusion/container/list/list.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/generation/detail/preprocessed/list_tie.hpp> +#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 <boost/fusion/container/generation/detail/pp_list_tie.hpp> +#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 <BOOST_PP_ENUM_PARAMS(N, typename T)> + #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<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type; + }; + } + + template <BOOST_PP_ENUM_PARAMS(N, typename T)> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> + list_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) + { + return list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/boost/fusion/container/generation/detail/pp_make_list.hpp b/boost/fusion/container/generation/detail/pp_make_list.hpp new file mode 100644 index 0000000000..989bf36bd9 --- /dev/null +++ b/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 <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/fusion/container/list/list.hpp> +#include <boost/fusion/support/detail/as_fusion_element.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/generation/detail/preprocessed/make_list.hpp> +#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<BOOST_PP_CAT(T, n)>::type + +#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_make_list.hpp> +#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 <BOOST_PP_ENUM_PARAMS(N, typename T)> + #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<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type; + }; + } + + template <BOOST_PP_ENUM_PARAMS(N, typename T)> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline list<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> + make_list(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) + { + return list<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/boost/fusion/container/generation/detail/pp_make_set.hpp b/boost/fusion/container/generation/detail/pp_make_set.hpp new file mode 100644 index 0000000000..f3f9a9e8fc --- /dev/null +++ b/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 <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/fusion/support/config.hpp> +#include <boost/fusion/container/set/set.hpp> +#include <boost/fusion/support/detail/as_fusion_element.hpp> +#include <boost/fusion/support/pair.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/generation/detail/preprocessed/make_set.hpp> +#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<BOOST_PP_CAT(T, n)>::type + +#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_make_set.hpp> +#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 <BOOST_PP_ENUM_PARAMS(N, typename T)> + #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<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type; + }; + } + + template <BOOST_PP_ENUM_PARAMS(N, typename T)> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline set<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> + make_set(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) + { + return set<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/boost/fusion/container/generation/detail/pp_make_vector.hpp b/boost/fusion/container/generation/detail/pp_make_vector.hpp new file mode 100644 index 0000000000..b19cf35457 --- /dev/null +++ b/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 <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/support/detail/as_fusion_element.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/generation/detail/preprocessed/make_vector.hpp> +#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<BOOST_PP_CAT(T, n)>::type + +#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_make_vector.hpp> +#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 <BOOST_PP_ENUM_PARAMS(N, typename T)> + #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)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type; + }; + } + + template <BOOST_PP_ENUM_PARAMS(N, typename T)> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> + make_vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) + { + return BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/boost/fusion/container/generation/detail/pp_vector_tie.hpp b/boost/fusion/container/generation/detail/pp_vector_tie.hpp new file mode 100644 index 0000000000..132c38afe9 --- /dev/null +++ b/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 <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/fusion/container/vector/vector.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/generation/detail/preprocessed/vector_tie.hpp> +#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 <boost/fusion/container/generation/detail/pp_vector_tie.hpp> +#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 <BOOST_PP_ENUM_PARAMS(N, typename T)> + #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<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type; + }; + } + + template <BOOST_PP_ENUM_PARAMS(N, typename T)> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline vector<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> + vector_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) + { + return vector<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/boost/fusion/container/generation/ignore.hpp b/boost/fusion/container/generation/ignore.hpp index 15ce15d4a1..781966322f 100644 --- a/boost/fusion/container/generation/ignore.hpp +++ b/boost/fusion/container/generation/ignore.hpp @@ -9,6 +9,8 @@ #if !defined(FUSION_IGNORE_07192005_0329) #define FUSION_IGNORE_07192005_0329 +#include <boost/fusion/support/config.hpp> + namespace boost { namespace fusion { // Swallows any assignment (by Doug Gregor) @@ -17,7 +19,7 @@ namespace boost { namespace fusion struct swallow_assign { template<typename T> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_CONSTEXPR_THIS BOOST_FUSION_GPU_ENABLED swallow_assign const& operator=(const T&) const { @@ -27,7 +29,7 @@ namespace boost { namespace fusion } // "ignore" allows tuple positions to be ignored when using "tie". - BOOST_CONSTEXPR detail::swallow_assign const ignore = detail::swallow_assign(); + BOOST_CONSTEXPR_OR_CONST detail::swallow_assign ignore = detail::swallow_assign(); }} #endif diff --git a/boost/fusion/container/generation/list_tie.hpp b/boost/fusion/container/generation/list_tie.hpp index 1dccb5151e..9190716740 100644 --- a/boost/fusion/container/generation/list_tie.hpp +++ b/boost/fusion/container/generation/list_tie.hpp @@ -1,102 +1,44 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2015 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_LIST_TIE_07192005_0109) -#define FUSION_LIST_TIE_07192005_0109 +#ifndef FUSION_LIST_TIE_06182015_0825 +#define FUSION_LIST_TIE_06182015_0825 -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/cat.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/fusion/support/config.hpp> #include <boost/fusion/container/list/list.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/generation/detail/preprocessed/list_tie.hpp> +#if !defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# include <boost/fusion/container/generation/detail/pp_list_tie.hpp> #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 <boost/fusion/container/generation/list_tie.hpp> -#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 -// +// C++11 variadic interface /////////////////////////////////////////////////////////////////////////////// -#define N BOOST_PP_ITERATION() - +namespace boost { namespace fusion +{ namespace result_of { - template <BOOST_PP_ENUM_PARAMS(N, typename T)> - #define TEXT(z, n, text) , text - struct list_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) > - #undef TEXT + template <typename ...T> + struct list_tie { - typedef list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type; + typedef list<T&...> type; }; } - template <BOOST_PP_ENUM_PARAMS(N, typename T)> + template <typename ...T> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> - list_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) + inline list<T&...> + list_tie(T&... arg) { - return list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>( - BOOST_PP_ENUM_PARAMS(N, arg)); + return list<T&...>(arg...); } +}} + +#endif -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) +#endif diff --git a/boost/fusion/container/generation/make_list.hpp b/boost/fusion/container/generation/make_list.hpp index 8cfc7e6227..e88f553a26 100644 --- a/boost/fusion/container/generation/make_list.hpp +++ b/boost/fusion/container/generation/make_list.hpp @@ -1,115 +1,46 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_MAKE_LIST_07192005_1239) -#define FUSION_MAKE_LIST_07192005_1239 +#ifndef FUSION_MAKE_LIST_10262014_0647 +#define FUSION_MAKE_LIST_10262014_0647 -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/fusion/support/config.hpp> #include <boost/fusion/container/list/list.hpp> -#include <boost/fusion/support/detail/as_fusion_element.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/generation/detail/preprocessed/make_list.hpp> +#if !defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# include <boost/fusion/container/generation/detail/pp_make_list.hpp> #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! -==============================================================================*/ +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic interface +/////////////////////////////////////////////////////////////////////////////// -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +#include <boost/fusion/support/detail/as_fusion_element.hpp> namespace boost { namespace fusion { - struct void_; - namespace result_of { - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_LIST_SIZE, typename T, void_) - , typename Extra = void_ - > - struct make_list; - - template <> - struct make_list<> + template <typename ...T> + struct make_list { - typedef list<> type; + typedef list<typename detail::as_fusion_element<T>::type...> type; }; } + template <typename ...T> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline list<> - make_list() + inline typename result_of::make_list<T...>::type + make_list(T const&... arg) { - return list<>(); + return typename result_of::make_list<T...>::type(arg...); } + }} -#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ - typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type - -#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_list.hpp> -#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 <BOOST_PP_ENUM_PARAMS(N, typename T)> - #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<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type; - }; - } - - template <BOOST_PP_ENUM_PARAMS(N, typename T)> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline list<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> - make_list(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) - { - return list<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>( - BOOST_PP_ENUM_PARAMS(N, arg)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) diff --git a/boost/fusion/container/generation/make_set.hpp b/boost/fusion/container/generation/make_set.hpp index 0bde4a9c49..705ec582a8 100644 --- a/boost/fusion/container/generation/make_set.hpp +++ b/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 <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -#include <boost/preprocessor/repetition/repeat_from_to.hpp> #include <boost/fusion/support/config.hpp> #include <boost/fusion/container/set/set.hpp> -#include <boost/fusion/support/detail/as_fusion_element.hpp> -#include <boost/fusion/support/pair.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/generation/detail/preprocessed/make_set.hpp> -#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_; +# include <boost/fusion/container/generation/detail/pp_make_set.hpp> - 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<BOOST_PP_CAT(T, n)>::type - -#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_set.hpp> -#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 <BOOST_PP_ENUM_PARAMS(N, typename T)> - #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<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type; - }; - } - - template <BOOST_PP_ENUM_PARAMS(N, typename T)> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline set<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> - make_set(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) - { - return set<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>( - BOOST_PP_ENUM_PARAMS(N, arg)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) diff --git a/boost/fusion/container/generation/make_vector.hpp b/boost/fusion/container/generation/make_vector.hpp index 57cd9b1003..8f0674815e 100644 --- a/boost/fusion/container/generation/make_vector.hpp +++ b/boost/fusion/container/generation/make_vector.hpp @@ -1,115 +1,16 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_MAKE_VECTOR_07162005_0243) -#define FUSION_MAKE_VECTOR_07162005_0243 +#ifndef FUSION_MAKE_VECTOR_11112014_2252 +#define FUSION_MAKE_VECTOR_11112014_2252 -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/fusion/support/config.hpp> #include <boost/fusion/container/vector/vector.hpp> -#include <boost/fusion/support/detail/as_fusion_element.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/generation/detail/preprocessed/make_vector.hpp> -#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 +# include <boost/fusion/container/generation/detail/pp_make_vector.hpp> - 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<BOOST_PP_CAT(T, n)>::type - -#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_vector.hpp> -#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 <BOOST_PP_ENUM_PARAMS(N, typename T)> - #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)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type; - }; - } - - template <BOOST_PP_ENUM_PARAMS(N, typename T)> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> - make_vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) - { - return BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>( - BOOST_PP_ENUM_PARAMS(N, arg)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - diff --git a/boost/fusion/container/generation/vector_tie.hpp b/boost/fusion/container/generation/vector_tie.hpp index 28efa3bdfb..5bb4face4d 100644 --- a/boost/fusion/container/generation/vector_tie.hpp +++ b/boost/fusion/container/generation/vector_tie.hpp @@ -1,100 +1,15 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_VECTOR_TIE_07192005_1242) -#define FUSION_VECTOR_TIE_07192005_1242 +#ifndef FUSION_VECTOR_TIE_11112014_2302 +#define FUSION_VECTOR_TIE_11112014_2302 -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/cat.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -#include <boost/preprocessor/repetition/repeat_from_to.hpp> -#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/support/config.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/generation/detail/preprocessed/vector_tie.hpp> -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vector_tie" FUSION_MAX_VECTOR_SIZE_STR".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct void_; +# include <boost/fusion/container/generation/detail/pp_vector_tie.hpp> - 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 <boost/fusion/container/generation/vector_tie.hpp> -#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 <BOOST_PP_ENUM_PARAMS(N, typename T)> - #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<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type; - }; - } - - template <BOOST_PP_ENUM_PARAMS(N, typename T)> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline vector<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> - vector_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) - { - return vector<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>( - BOOST_PP_ENUM_PARAMS(N, arg)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - diff --git a/boost/fusion/container/list.hpp b/boost/fusion/container/list.hpp index bdb5dc9a02..e3a1d8eff0 100644 --- a/boost/fusion/container/list.hpp +++ b/boost/fusion/container/list.hpp @@ -10,7 +10,6 @@ #include <boost/fusion/support/config.hpp> #include <boost/fusion/container/list/cons.hpp> #include <boost/fusion/container/list/cons_iterator.hpp> -#include <boost/fusion/container/list/limits.hpp> #include <boost/fusion/container/list/list.hpp> #include <boost/fusion/container/list/list_fwd.hpp> #include <boost/fusion/container/list/convert.hpp> diff --git a/boost/fusion/container/list/cons.hpp b/boost/fusion/container/list/cons.hpp index 61d8dbcfe1..e05b62eb48 100644 --- a/boost/fusion/container/list/cons.hpp +++ b/boost/fusion/container/list/cons.hpp @@ -23,6 +23,7 @@ #include <boost/fusion/container/list/detail/value_at_impl.hpp> #include <boost/fusion/container/list/detail/empty_impl.hpp> #include <boost/type_traits/is_convertible.hpp> +#include <boost/type_traits/is_base_of.hpp> #include <boost/utility/enable_if.hpp> #include <boost/fusion/support/sequence_base.hpp> #include <boost/fusion/support/is_sequence.hpp> @@ -73,12 +74,13 @@ namespace boost { namespace fusion : car(rhs.car), cdr(rhs.cdr) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED cons( Sequence const& seq , typename boost::enable_if< mpl::and_< traits::is_sequence<Sequence> + , mpl::not_<is_base_of<cons, Sequence> > , mpl::not_<is_convertible<Sequence, Car> > > // use copy to car instead >::type* /*dummy*/ = 0 ) diff --git a/boost/fusion/container/list/limits.hpp b/boost/fusion/container/list/detail/cpp03/limits.hpp index cc64ad7224..cc64ad7224 100644 --- a/boost/fusion/container/list/limits.hpp +++ b/boost/fusion/container/list/detail/cpp03/limits.hpp diff --git a/boost/fusion/container/list/detail/cpp03/list.hpp b/boost/fusion/container/list/detail/cpp03/list.hpp new file mode 100644 index 0000000000..b39489b0b7 --- /dev/null +++ b/boost/fusion/container/list/detail/cpp03/list.hpp @@ -0,0 +1,102 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_LIST_07172005_1153) +#define FUSION_LIST_07172005_1153 + +#include <boost/fusion/support/config.hpp> +#include <boost/fusion/container/list/detail/cpp03/list_fwd.hpp> +#include <boost/fusion/container/list/detail/cpp03/list_to_cons.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/core/enable_if.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list.hpp> +#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 <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)> + struct list + : detail::list_to_cons<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, T)>::type + { + private: + typedef + detail::list_to_cons<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, T)> + list_to_cons; + typedef typename list_to_cons::type inherited_type; + + public: + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + list() + : inherited_type() {} + + template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + list(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs) + : inherited_type(rhs) {} + + template <typename Sequence> + BOOST_FUSION_GPU_ENABLED + list(Sequence const& rhs + , typename boost::enable_if<traits::is_sequence<Sequence> >::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<T0>::type arg0 + // , typename detail::call_param<T1>::type arg1) + // : inherited_type(list_to_cons::call(arg0, arg1)) {} + #include <boost/fusion/container/list/detail/cpp03/list_forward_ctor.hpp> + + template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)> + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + list& + operator=(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs) + { + inherited_type::operator=(rhs); + return *this; + } + + template <typename Sequence> + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename boost::enable_if<traits::is_sequence<Sequence>, 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/boost/fusion/container/list/detail/list_forward_ctor.hpp b/boost/fusion/container/list/detail/cpp03/list_forward_ctor.hpp index a5c8aa66c9..f9a706786b 100644 --- a/boost/fusion/container/list/detail/list_forward_ctor.hpp +++ b/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 \ - <boost/fusion/container/list/detail/list_forward_ctor.hpp> + <boost/fusion/container/list/detail/cpp03/list_forward_ctor.hpp> #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) #include BOOST_PP_ITERATE() diff --git a/boost/fusion/container/list/detail/cpp03/list_fwd.hpp b/boost/fusion/container/list/detail/cpp03/list_fwd.hpp new file mode 100644 index 0000000000..cedc700343 --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/fusion/container/list/detail/cpp03/limits.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp> +#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/boost/fusion/container/list/detail/cpp03/list_to_cons.hpp b/boost/fusion/container/list/detail/cpp03/list_to_cons.hpp new file mode 100644 index 0000000000..989e91abe3 --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/fusion/container/list/cons.hpp> +#include <boost/fusion/container/list/detail/cpp03/limits.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_shifted_params.hpp> +#include <boost/preprocessor/arithmetic/dec.hpp> + +#define FUSION_VOID(z, n, _) void_ + +namespace boost { namespace fusion +{ + struct nil_; + struct void_; +}} + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons.hpp> +#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 <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)> + 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<head_type, tail_type> type; + + #include <boost/fusion/container/list/detail/cpp03/list_to_cons_call.hpp> + }; + + template <> + struct list_to_cons<BOOST_PP_ENUM(FUSION_MAX_LIST_SIZE, FUSION_VOID, _)> + { + 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/boost/fusion/container/list/detail/list_to_cons_call.hpp b/boost/fusion/container/list/detail/cpp03/list_to_cons_call.hpp index fbae58009e..e49db4a840 100644 --- a/boost/fusion/container/list/detail/list_to_cons_call.hpp +++ b/boost/fusion/container/list/detail/cpp03/list_to_cons_call.hpp @@ -13,7 +13,7 @@ #include <boost/preprocessor/repetition/enum_binary_params.hpp> #define BOOST_PP_FILENAME_1 \ - <boost/fusion/container/list/detail/list_to_cons_call.hpp> + <boost/fusion/container/list/detail/cpp03/list_to_cons_call.hpp> #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE) #include BOOST_PP_ITERATE() diff --git a/boost/fusion/container/list/detail/preprocessed/list.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list.hpp index 315ffcf7ee..7af66f4964 100644 --- a/boost/fusion/container/list/detail/preprocessed/list.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_LIST_SIZE <= 10 -#include <boost/fusion/container/list/detail/preprocessed/list10.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp> #elif FUSION_MAX_LIST_SIZE <= 20 -#include <boost/fusion/container/list/detail/preprocessed/list20.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp> #elif FUSION_MAX_LIST_SIZE <= 30 -#include <boost/fusion/container/list/detail/preprocessed/list30.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp> #elif FUSION_MAX_LIST_SIZE <= 40 -#include <boost/fusion/container/list/detail/preprocessed/list40.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp> #elif FUSION_MAX_LIST_SIZE <= 50 -#include <boost/fusion/container/list/detail/preprocessed/list50.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp> #else #error "FUSION_MAX_LIST_SIZE out of bounds for preprocessed headers" #endif diff --git a/boost/fusion/container/list/detail/preprocessed/list10.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp index 9a289365cd..47db8f588c 100644 --- a/boost/fusion/container/list/detail/preprocessed/list10.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp @@ -18,8 +18,8 @@ namespace boost { namespace fusion typedef detail::list_to_cons<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> list_to_cons; - public: typedef typename list_to_cons::type inherited_type; + public: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED list() : inherited_type() {} @@ -28,7 +28,7 @@ namespace boost { namespace fusion list(list<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9> const& rhs) : inherited_type(rhs) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) : inherited_type(rhs) {} diff --git a/boost/fusion/container/list/detail/preprocessed/list10_fwd.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp index f513a99194..f513a99194 100644 --- a/boost/fusion/container/list/detail/preprocessed/list10_fwd.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp diff --git a/boost/fusion/container/list/detail/preprocessed/list20.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp index a201cb44de..8eb7d2d2df 100644 --- a/boost/fusion/container/list/detail/preprocessed/list20.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp @@ -18,8 +18,8 @@ namespace boost { namespace fusion typedef detail::list_to_cons<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> list_to_cons; - public: typedef typename list_to_cons::type inherited_type; + public: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED list() : inherited_type() {} @@ -28,7 +28,7 @@ namespace boost { namespace fusion list(list<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19> const& rhs) : inherited_type(rhs) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) : inherited_type(rhs) {} diff --git a/boost/fusion/container/list/detail/preprocessed/list20_fwd.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp index 2eedc8b293..2eedc8b293 100644 --- a/boost/fusion/container/list/detail/preprocessed/list20_fwd.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp diff --git a/boost/fusion/container/list/detail/preprocessed/list30.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp index ef9e65fc6a..fb24e8d47b 100644 --- a/boost/fusion/container/list/detail/preprocessed/list30.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp @@ -18,8 +18,8 @@ namespace boost { namespace fusion typedef detail::list_to_cons<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29> list_to_cons; - public: typedef typename list_to_cons::type inherited_type; + public: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED list() : inherited_type() {} @@ -28,7 +28,7 @@ namespace boost { namespace fusion list(list<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29> const& rhs) : inherited_type(rhs) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) : inherited_type(rhs) {} diff --git a/boost/fusion/container/list/detail/preprocessed/list30_fwd.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp index 32bfc606f7..32bfc606f7 100644 --- a/boost/fusion/container/list/detail/preprocessed/list30_fwd.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp diff --git a/boost/fusion/container/list/detail/preprocessed/list40.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp index 570b2ccdda..49437dee5e 100644 --- a/boost/fusion/container/list/detail/preprocessed/list40.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp @@ -18,8 +18,8 @@ namespace boost { namespace fusion typedef detail::list_to_cons<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39> list_to_cons; - public: typedef typename list_to_cons::type inherited_type; + public: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED list() : inherited_type() {} @@ -28,7 +28,7 @@ namespace boost { namespace fusion list(list<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39> const& rhs) : inherited_type(rhs) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) : inherited_type(rhs) {} diff --git a/boost/fusion/container/list/detail/preprocessed/list40_fwd.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp index 5d0da6df4b..5d0da6df4b 100644 --- a/boost/fusion/container/list/detail/preprocessed/list40_fwd.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp diff --git a/boost/fusion/container/list/detail/preprocessed/list50.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp index d237cdf998..3ebbf19586 100644 --- a/boost/fusion/container/list/detail/preprocessed/list50.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp @@ -18,8 +18,8 @@ namespace boost { namespace fusion typedef detail::list_to_cons<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 , T49> list_to_cons; - public: typedef typename list_to_cons::type inherited_type; + public: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED list() : inherited_type() {} @@ -28,7 +28,7 @@ namespace boost { namespace fusion list(list<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39 , U40 , U41 , U42 , U43 , U44 , U45 , U46 , U47 , U48 , U49> const& rhs) : inherited_type(rhs) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) : inherited_type(rhs) {} diff --git a/boost/fusion/container/list/detail/preprocessed/list50_fwd.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp index 2b3ae66cb6..2b3ae66cb6 100644 --- a/boost/fusion/container/list/detail/preprocessed/list50_fwd.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp diff --git a/boost/fusion/container/list/detail/preprocessed/list_fwd.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp index b9be34752f..8a4037da48 100644 --- a/boost/fusion/container/list/detail/preprocessed/list_fwd.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_LIST_SIZE <= 10 -#include <boost/fusion/container/list/detail/preprocessed/list10_fwd.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp> #elif FUSION_MAX_LIST_SIZE <= 20 -#include <boost/fusion/container/list/detail/preprocessed/list20_fwd.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp> #elif FUSION_MAX_LIST_SIZE <= 30 -#include <boost/fusion/container/list/detail/preprocessed/list30_fwd.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp> #elif FUSION_MAX_LIST_SIZE <= 40 -#include <boost/fusion/container/list/detail/preprocessed/list40_fwd.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp> #elif FUSION_MAX_LIST_SIZE <= 50 -#include <boost/fusion/container/list/detail/preprocessed/list50_fwd.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp> #else #error "FUSION_MAX_LIST_SIZE out of bounds for preprocessed headers" #endif diff --git a/boost/fusion/container/list/detail/preprocessed/list_to_cons.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons.hpp index 0326bef1e5..d9ee9bb245 100644 --- a/boost/fusion/container/list/detail/preprocessed/list_to_cons.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_LIST_SIZE <= 10 -#include <boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons10.hpp> #elif FUSION_MAX_LIST_SIZE <= 20 -#include <boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons20.hpp> #elif FUSION_MAX_LIST_SIZE <= 30 -#include <boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons30.hpp> #elif FUSION_MAX_LIST_SIZE <= 40 -#include <boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons40.hpp> #elif FUSION_MAX_LIST_SIZE <= 50 -#include <boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp> +#include <boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons50.hpp> #else #error "FUSION_MAX_LIST_SIZE out of bounds for preprocessed headers" #endif diff --git a/boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons10.hpp index a98a8cc55f..a98a8cc55f 100644 --- a/boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons10.hpp diff --git a/boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons20.hpp index 3adce01d8d..3adce01d8d 100644 --- a/boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons20.hpp diff --git a/boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons30.hpp index 7a834a7064..7a834a7064 100644 --- a/boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons30.hpp diff --git a/boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons40.hpp index 731782dbfa..731782dbfa 100644 --- a/boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons40.hpp diff --git a/boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons50.hpp index e25371b5ae..e25371b5ae 100644 --- a/boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list_to_cons50.hpp diff --git a/boost/fusion/container/list/detail/list_to_cons.hpp b/boost/fusion/container/list/detail/list_to_cons.hpp index bc8718631c..1ce1cfbafb 100644 --- a/boost/fusion/container/list/detail/list_to_cons.hpp +++ b/boost/fusion/container/list/detail/list_to_cons.hpp @@ -1,76 +1,61 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014-2015 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#if !defined(FUSION_LIST_TO_CONS_07172005_1041) -#define FUSION_LIST_TO_CONS_07172005_1041 +#ifndef FUSION_LIST_MAIN_10262014_0447 +#define FUSION_LIST_MAIN_10262014_0447 +#include <boost/config.hpp> #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/list/cons.hpp> -#include <boost/fusion/container/list/limits.hpp> -#include <boost/preprocessor/repetition/enum.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_shifted_params.hpp> -#include <boost/preprocessor/arithmetic/dec.hpp> - -#define FUSION_VOID(z, n, _) void_ - -namespace boost { namespace fusion -{ - struct nil_; - struct void_; -}} +#include <boost/fusion/container/list/list_fwd.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/list/detail/preprocessed/list_to_cons.hpp> +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# include <boost/fusion/container/list/detail/cpp03/list_to_cons.hpp> #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 +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include <boost/fusion/container/list/cons.hpp> +#include <boost/fusion/support/detail/access.hpp> - 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) +namespace boost { namespace fusion { namespace detail +{ + template <typename ...T> + struct list_to_cons; - This is an auto-generated file. Do not edit! -==============================================================================*/ + template <> + struct list_to_cons<> + { + typedef nil_ type; -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static type call() { return type(); } + }; -namespace boost { namespace fusion { namespace detail -{ - template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)> - struct list_to_cons + template <typename Head, typename ...Tail> + struct list_to_cons<Head, Tail...> { - typedef T0 head_type; - typedef list_to_cons< - BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_LIST_SIZE, T), void_> - tail_list_to_cons; + typedef Head head_type; + typedef list_to_cons<Tail...> tail_list_to_cons; typedef typename tail_list_to_cons::type tail_type; typedef cons<head_type, tail_type> type; - #include <boost/fusion/container/list/detail/list_to_cons_call.hpp> - }; - - template <> - struct list_to_cons<BOOST_PP_ENUM(FUSION_MAX_LIST_SIZE, FUSION_VOID, _)> - { - typedef nil_ type; + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static type + call(typename detail::call_param<Head>::type _h, + typename detail::call_param<Tail>::type ..._t) + { + return type(_h, tail_list_to_cons::call(_t...)); + } }; }}} -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) #endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - -#undef FUSION_VOID #endif diff --git a/boost/fusion/container/list/list.hpp b/boost/fusion/container/list/list.hpp index 5b584131cc..865a6d7def 100644 --- a/boost/fusion/container/list/list.hpp +++ b/boost/fusion/container/list/list.hpp @@ -1,103 +1,127 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014-2015 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#if !defined(FUSION_LIST_07172005_1153) -#define FUSION_LIST_07172005_1153 +#ifndef FUSION_LIST_10262014_0537 +#define FUSION_LIST_10262014_0537 #include <boost/fusion/support/config.hpp> #include <boost/fusion/container/list/list_fwd.hpp> -#include <boost/fusion/container/list/detail/list_to_cons.hpp> -#include <boost/fusion/support/is_sequence.hpp> -#include <boost/core/enable_if.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/list/detail/preprocessed/list.hpp> +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# include <boost/fusion/container/list/detail/cpp03/list.hpp> #else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/list" FUSION_MAX_LIST_SIZE_STR ".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include <utility> +#include <boost/fusion/container/list/detail/list_to_cons.hpp> namespace boost { namespace fusion { struct nil_; - struct void_; - template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)> - struct list - : detail::list_to_cons<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, T)>::type + template <> + struct list<> + : detail::list_to_cons<>::type { private: - typedef - detail::list_to_cons<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, T)> - list_to_cons; + typedef detail::list_to_cons<> list_to_cons; + typedef list_to_cons::type inherited_type; public: - typedef typename list_to_cons::type inherited_type; - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED list() : inherited_type() {} - template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - list(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs) +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template <typename Sequence> + BOOST_FUSION_GPU_ENABLED + list(Sequence const& rhs) : inherited_type(rhs) {} template <typename Sequence> + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + list& + operator=(Sequence const& rhs) + { + inherited_type::operator=(rhs); + return *this; + } +#else + template <typename Sequence> + BOOST_FUSION_GPU_ENABLED + list(Sequence&& rhs) + : inherited_type(std::forward<Sequence>(rhs)) {} + + template <typename Sequence> + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + list& + operator=(Sequence&& rhs) + { + inherited_type::operator=(std::forward<Sequence>(rhs)); + return *this; + } +#endif + }; + + template <typename ...T> + struct list + : detail::list_to_cons<T...>::type + { + private: + typedef detail::list_to_cons<T...> list_to_cons; + typedef typename list_to_cons::type inherited_type; + + public: BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - list(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + list() + : inherited_type() {} + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template <typename Sequence> + BOOST_FUSION_GPU_ENABLED + list(Sequence const& rhs) : inherited_type(rhs) {} +#else + template <typename Sequence> + BOOST_FUSION_GPU_ENABLED + list(Sequence&& rhs) + : inherited_type(std::forward<Sequence>(rhs)) {} +#endif - // Expand a couple of forwarding constructors for arguments - // of type (T0), (T0, T1), (T0, T1, T2) etc. Exanple: - // - // list( - // typename detail::call_param<T0>::type arg0 - // , typename detail::call_param<T1>::type arg1) - // : inherited_type(list_to_cons::call(arg0, arg1)) {} - #include <boost/fusion/container/list/detail/list_forward_ctor.hpp> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + explicit + list(typename detail::call_param<T>::type ...args) + : inherited_type(list_to_cons::call(args...)) {} - template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)> +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template <typename Sequence> BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED list& - operator=(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs) + operator=(Sequence const& rhs) { inherited_type::operator=(rhs); return *this; } - +#else template <typename Sequence> BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - typename boost::enable_if<traits::is_sequence<Sequence>, list&>::type - operator=(Sequence const& rhs) + list& + operator=(Sequence&& rhs) { - inherited_type::operator=(rhs); + inherited_type::operator=(std::forward<Sequence>(rhs)); return *this; } +#endif }; }} -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) #endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - #endif diff --git a/boost/fusion/container/list/list_fwd.hpp b/boost/fusion/container/list/list_fwd.hpp index d827d283e8..c5f2619267 100644 --- a/boost/fusion/container/list/list_fwd.hpp +++ b/boost/fusion/container/list/list_fwd.hpp @@ -1,51 +1,43 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#if !defined(FUSION_LIST_FORWARD_07172005_0224) -#define FUSION_LIST_FORWARD_07172005_0224 +#ifndef FUSION_LIST_FORWARD_10262014_0528 +#define FUSION_LIST_FORWARD_10262014_0528 #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/list/limits.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/config.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/list/detail/preprocessed/list_fwd.hpp> +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \ + || (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) +# if defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# undef BOOST_FUSION_HAS_VARIADIC_LIST +# endif #else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/list" FUSION_MAX_LIST_SIZE_STR "_fwd.hpp") +# if !defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# define BOOST_FUSION_HAS_VARIADIC_LIST +# endif #endif -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +/////////////////////////////////////////////////////////////////////////////// +// With no variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_LIST) +# include <boost/fusion/container/list/detail/cpp03/list_fwd.hpp> +#else +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// namespace boost { namespace fusion { struct void_; - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_LIST_SIZE, typename T, void_) - > + template <typename ...T> 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/boost/fusion/container/map/detail/cpp03/limits.hpp b/boost/fusion/container/map/detail/cpp03/limits.hpp index 43b5abb261..1eaa528c44 100644 --- a/boost/fusion/container/map/detail/cpp03/limits.hpp +++ b/boost/fusion/container/map/detail/cpp03/limits.hpp @@ -8,7 +8,7 @@ #define FUSION_MAP_LIMITS_07212005_1104 #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/vector/limits.hpp> +#include <boost/fusion/container/vector/detail/cpp03/limits.hpp> #if !defined(FUSION_MAX_MAP_SIZE) # define FUSION_MAX_MAP_SIZE FUSION_MAX_VECTOR_SIZE diff --git a/boost/fusion/container/map/detail/cpp03/map.hpp b/boost/fusion/container/map/detail/cpp03/map.hpp index e2f471b5d3..3ff1d05d82 100644 --- a/boost/fusion/container/map/detail/cpp03/map.hpp +++ b/boost/fusion/container/map/detail/cpp03/map.hpp @@ -85,7 +85,7 @@ namespace boost { namespace fusion : data(rhs.data) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence const& rhs) : data(rhs) {} diff --git a/boost/fusion/container/map/detail/cpp03/preprocessed/map10.hpp b/boost/fusion/container/map/detail/cpp03/preprocessed/map10.hpp index 7b21767038..9721bb6245 100644 --- a/boost/fusion/container/map/detail/cpp03/preprocessed/map10.hpp +++ b/boost/fusion/container/map/detail/cpp03/preprocessed/map10.hpp @@ -28,7 +28,7 @@ namespace boost { namespace fusion map(map const& rhs) : data(rhs.data) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence const& rhs) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED diff --git a/boost/fusion/container/map/detail/cpp03/preprocessed/map20.hpp b/boost/fusion/container/map/detail/cpp03/preprocessed/map20.hpp index 1edb7a7d90..88075f454d 100644 --- a/boost/fusion/container/map/detail/cpp03/preprocessed/map20.hpp +++ b/boost/fusion/container/map/detail/cpp03/preprocessed/map20.hpp @@ -28,7 +28,7 @@ namespace boost { namespace fusion map(map const& rhs) : data(rhs.data) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence const& rhs) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED diff --git a/boost/fusion/container/map/detail/cpp03/preprocessed/map30.hpp b/boost/fusion/container/map/detail/cpp03/preprocessed/map30.hpp index 3ee6cf8b29..78730efc6b 100644 --- a/boost/fusion/container/map/detail/cpp03/preprocessed/map30.hpp +++ b/boost/fusion/container/map/detail/cpp03/preprocessed/map30.hpp @@ -28,7 +28,7 @@ namespace boost { namespace fusion map(map const& rhs) : data(rhs.data) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence const& rhs) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED diff --git a/boost/fusion/container/map/detail/cpp03/preprocessed/map40.hpp b/boost/fusion/container/map/detail/cpp03/preprocessed/map40.hpp index 6e28c907c6..2bfcdb57ca 100644 --- a/boost/fusion/container/map/detail/cpp03/preprocessed/map40.hpp +++ b/boost/fusion/container/map/detail/cpp03/preprocessed/map40.hpp @@ -28,7 +28,7 @@ namespace boost { namespace fusion map(map const& rhs) : data(rhs.data) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence const& rhs) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED diff --git a/boost/fusion/container/map/detail/cpp03/preprocessed/map50.hpp b/boost/fusion/container/map/detail/cpp03/preprocessed/map50.hpp index e91d145512..ec2792641f 100644 --- a/boost/fusion/container/map/detail/cpp03/preprocessed/map50.hpp +++ b/boost/fusion/container/map/detail/cpp03/preprocessed/map50.hpp @@ -28,7 +28,7 @@ namespace boost { namespace fusion map(map const& rhs) : data(rhs.data) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence const& rhs) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED diff --git a/boost/fusion/container/map/map.hpp b/boost/fusion/container/map/map.hpp index f93a693f74..e90d28a939 100644 --- a/boost/fusion/container/map/map.hpp +++ b/boost/fusion/container/map/map.hpp @@ -66,21 +66,21 @@ namespace boost { namespace fusion {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence const& seq , typename enable_if<traits::is_sequence<Sequence>>::type* /*dummy*/ = 0) : base_type(begin(seq), detail::map_impl_from_iterator()) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence& seq , typename enable_if<traits::is_sequence<Sequence>>::type* /*dummy*/ = 0) : base_type(begin(seq), detail::map_impl_from_iterator()) {} template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED map(Sequence&& seq , typename enable_if<traits::is_sequence<Sequence>>::type* /*dummy*/ = 0) : base_type(begin(seq), detail::map_impl_from_iterator()) @@ -93,7 +93,7 @@ namespace boost { namespace fusion {} template <typename First, typename ...T_> - 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/boost/fusion/container/set.hpp b/boost/fusion/container/set.hpp index 6445397464..c9aa6241c2 100644 --- a/boost/fusion/container/set.hpp +++ b/boost/fusion/container/set.hpp @@ -8,7 +8,6 @@ #define FUSION_SEQUENCE_CLASS_SET_10022005_0607 #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/set/limits.hpp> #include <boost/fusion/container/set/set.hpp> #include <boost/fusion/container/set/set_fwd.hpp> #include <boost/fusion/container/set/convert.hpp> diff --git a/boost/fusion/container/set/detail/as_set.hpp b/boost/fusion/container/set/detail/as_set.hpp index a41498a333..1eb0d3fe12 100644 --- a/boost/fusion/container/set/detail/as_set.hpp +++ b/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 <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/repeat.hpp> -#include <boost/preprocessor/cat.hpp> -#include <boost/preprocessor/inc.hpp> -#include <boost/preprocessor/dec.hpp> -#include <boost/fusion/container/set/set.hpp> -#include <boost/fusion/iterator/value_of.hpp> -#include <boost/fusion/iterator/deref.hpp> -#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/support/config.hpp> +#include <boost/fusion/container/set/set_fwd.hpp> -namespace boost { namespace fusion { namespace detail -{ -BOOST_FUSION_BARRIER_BEGIN - - template <int size> - struct as_set; - - template <> - struct as_set<0> - { - template <typename Iterator> - struct apply - { - typedef set<> type; - }; - - template <typename Iterator> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static typename apply<Iterator>::type - call(Iterator) - { - return set<>(); - } - }; - -BOOST_FUSION_BARRIER_END -}}} - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/set/detail/preprocessed/as_set.hpp> -#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<BOOST_PP_CAT(I, n)>::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<BOOST_PP_CAT(I, n)>::type \ - BOOST_PP_CAT(T, n); - -#define BOOST_PP_FILENAME_1 <boost/fusion/container/set/detail/as_set.hpp> -#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 <boost/fusion/container/set/detail/cpp03/as_set.hpp> -#define N BOOST_PP_ITERATION() - - template <> - struct as_set<N> - { - template <typename I0> - struct apply - { - BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _) - BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _) - typedef set<BOOST_PP_ENUM_PARAMS(N, T)> type; - }; - - template <typename Iterator> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static typename apply<Iterator>::type - call(Iterator const& i0) - { - typedef apply<Iterator> 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/boost/fusion/container/set/detail/cpp03/as_set.hpp b/boost/fusion/container/set/detail/cpp03/as_set.hpp new file mode 100644 index 0000000000..c9159314b3 --- /dev/null +++ b/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 <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/repeat.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/inc.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/fusion/container/set/set.hpp> +#include <boost/fusion/iterator/value_of.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/iterator/next.hpp> + +namespace boost { namespace fusion { namespace detail +{ +BOOST_FUSION_BARRIER_BEGIN + + template <int size> + struct as_set; + + template <> + struct as_set<0> + { + template <typename Iterator> + struct apply + { + typedef set<> type; + }; + + template <typename Iterator> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static typename apply<Iterator>::type + call(Iterator) + { + return set<>(); + } + }; + +BOOST_FUSION_BARRIER_END +}}} + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/set/detail/cpp03/preprocessed/as_set.hpp> +#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<BOOST_PP_CAT(I, n)>::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<BOOST_PP_CAT(I, n)>::type \ + BOOST_PP_CAT(T, n); + +#define BOOST_PP_FILENAME_1 <boost/fusion/container/set/detail/cpp03/as_set.hpp> +#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<N> + { + template <typename I0> + struct apply + { + BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _) + BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _) + typedef set<BOOST_PP_ENUM_PARAMS(N, T)> type; + }; + + template <typename Iterator> + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static typename apply<Iterator>::type + call(Iterator const& i0) + { + typedef apply<Iterator> 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/boost/fusion/container/set/limits.hpp b/boost/fusion/container/set/detail/cpp03/limits.hpp index adfecdbd0a..2b800abfed 100644 --- a/boost/fusion/container/set/limits.hpp +++ b/boost/fusion/container/set/detail/cpp03/limits.hpp @@ -8,7 +8,7 @@ #define FUSION_SET_LIMITS_09162005_1103 #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/vector/limits.hpp> +#include <boost/fusion/container/vector/detail/cpp03/limits.hpp> #if !defined(FUSION_MAX_SET_SIZE) # define FUSION_MAX_SET_SIZE FUSION_MAX_VECTOR_SIZE diff --git a/boost/fusion/container/set/detail/preprocessed/as_set.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/as_set.hpp index 4231dcb180..da257ad900 100644 --- a/boost/fusion/container/set/detail/preprocessed/as_set.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/as_set.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_SET_SIZE <= 10 -#include <boost/fusion/container/set/detail/preprocessed/as_set10.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/as_set10.hpp> #elif FUSION_MAX_SET_SIZE <= 20 -#include <boost/fusion/container/set/detail/preprocessed/as_set20.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/as_set20.hpp> #elif FUSION_MAX_SET_SIZE <= 30 -#include <boost/fusion/container/set/detail/preprocessed/as_set30.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/as_set30.hpp> #elif FUSION_MAX_SET_SIZE <= 40 -#include <boost/fusion/container/set/detail/preprocessed/as_set40.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/as_set40.hpp> #elif FUSION_MAX_SET_SIZE <= 50 -#include <boost/fusion/container/set/detail/preprocessed/as_set50.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/as_set50.hpp> #else #error "FUSION_MAX_SET_SIZE out of bounds for preprocessed headers" #endif diff --git a/boost/fusion/container/set/detail/preprocessed/as_set10.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/as_set10.hpp index 019b0b7970..019b0b7970 100644 --- a/boost/fusion/container/set/detail/preprocessed/as_set10.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/as_set10.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/as_set20.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/as_set20.hpp index 8299b60794..8299b60794 100644 --- a/boost/fusion/container/set/detail/preprocessed/as_set20.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/as_set20.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/as_set30.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/as_set30.hpp index b8f8adb7a2..b8f8adb7a2 100644 --- a/boost/fusion/container/set/detail/preprocessed/as_set30.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/as_set30.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/as_set40.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/as_set40.hpp index de5091f8c3..de5091f8c3 100644 --- a/boost/fusion/container/set/detail/preprocessed/as_set40.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/as_set40.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/as_set50.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/as_set50.hpp index d169b04faf..d169b04faf 100644 --- a/boost/fusion/container/set/detail/preprocessed/as_set50.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/as_set50.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/set.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set.hpp index a64fab2c8e..715d5744f9 100644 --- a/boost/fusion/container/set/detail/preprocessed/set.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_SET_SIZE <= 10 -#include <boost/fusion/container/set/detail/preprocessed/set10.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp> #elif FUSION_MAX_SET_SIZE <= 20 -#include <boost/fusion/container/set/detail/preprocessed/set20.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp> #elif FUSION_MAX_SET_SIZE <= 30 -#include <boost/fusion/container/set/detail/preprocessed/set30.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp> #elif FUSION_MAX_SET_SIZE <= 40 -#include <boost/fusion/container/set/detail/preprocessed/set40.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp> #elif FUSION_MAX_SET_SIZE <= 50 -#include <boost/fusion/container/set/detail/preprocessed/set50.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp> #else #error "FUSION_MAX_SET_SIZE out of bounds for preprocessed headers" #endif diff --git a/boost/fusion/container/set/detail/preprocessed/set10.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp index d2eba4c8f5..d2eba4c8f5 100644 --- a/boost/fusion/container/set/detail/preprocessed/set10.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/set10_fwd.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set10_fwd.hpp index 8b6253dc3b..8b6253dc3b 100644 --- a/boost/fusion/container/set/detail/preprocessed/set10_fwd.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set10_fwd.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/set20.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp index 500e726e80..500e726e80 100644 --- a/boost/fusion/container/set/detail/preprocessed/set20.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/set20_fwd.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set20_fwd.hpp index acbb56dee0..acbb56dee0 100644 --- a/boost/fusion/container/set/detail/preprocessed/set20_fwd.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set20_fwd.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/set30.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp index 6c92bead0e..6c92bead0e 100644 --- a/boost/fusion/container/set/detail/preprocessed/set30.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/set30_fwd.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set30_fwd.hpp index 9c774b0dad..9c774b0dad 100644 --- a/boost/fusion/container/set/detail/preprocessed/set30_fwd.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set30_fwd.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/set40.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp index d3c3e5eb58..d3c3e5eb58 100644 --- a/boost/fusion/container/set/detail/preprocessed/set40.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/set40_fwd.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set40_fwd.hpp index 2f251c108c..2f251c108c 100644 --- a/boost/fusion/container/set/detail/preprocessed/set40_fwd.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set40_fwd.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/set50.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp index 1d2dfd446d..1d2dfd446d 100644 --- a/boost/fusion/container/set/detail/preprocessed/set50.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/set50_fwd.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set50_fwd.hpp index 478b98b578..478b98b578 100644 --- a/boost/fusion/container/set/detail/preprocessed/set50_fwd.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set50_fwd.hpp diff --git a/boost/fusion/container/set/detail/preprocessed/set_fwd.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set_fwd.hpp index 28a3e814d2..31e8e411bf 100644 --- a/boost/fusion/container/set/detail/preprocessed/set_fwd.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set_fwd.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_SET_SIZE <= 10 -#include <boost/fusion/container/set/detail/preprocessed/set10_fwd.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/set10_fwd.hpp> #elif FUSION_MAX_SET_SIZE <= 20 -#include <boost/fusion/container/set/detail/preprocessed/set20_fwd.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/set20_fwd.hpp> #elif FUSION_MAX_SET_SIZE <= 30 -#include <boost/fusion/container/set/detail/preprocessed/set30_fwd.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/set30_fwd.hpp> #elif FUSION_MAX_SET_SIZE <= 40 -#include <boost/fusion/container/set/detail/preprocessed/set40_fwd.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/set40_fwd.hpp> #elif FUSION_MAX_SET_SIZE <= 50 -#include <boost/fusion/container/set/detail/preprocessed/set50_fwd.hpp> +#include <boost/fusion/container/set/detail/cpp03/preprocessed/set50_fwd.hpp> #else #error "FUSION_MAX_SET_SIZE out of bounds for preprocessed headers" #endif diff --git a/boost/fusion/container/set/detail/cpp03/set.hpp b/boost/fusion/container/set/detail/cpp03/set.hpp new file mode 100644 index 0000000000..46191c5c63 --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/support/sequence_base.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/fusion/support/detail/access.hpp> +#include <boost/fusion/container/set/set_fwd.hpp> +#include <boost/fusion/container/set/detail/begin_impl.hpp> +#include <boost/fusion/container/set/detail/end_impl.hpp> +#include <boost/fusion/container/set/detail/value_of_impl.hpp> +#include <boost/fusion/container/set/detail/deref_data_impl.hpp> +#include <boost/fusion/container/set/detail/deref_impl.hpp> +#include <boost/fusion/container/set/detail/key_of_impl.hpp> +#include <boost/fusion/container/set/detail/value_of_data_impl.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/core/enable_if.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/set/detail/cpp03/preprocessed/set.hpp> +#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 <BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, typename T)> + struct set : sequence_base<set<BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)> > + { + 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 <typename Sequence> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + set(Sequence const& rhs + , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + : data(rhs) {} + + #include <boost/fusion/container/set/detail/cpp03/set_forward_ctor.hpp> + + template <typename T> + 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/boost/fusion/container/set/detail/set_forward_ctor.hpp b/boost/fusion/container/set/detail/cpp03/set_forward_ctor.hpp index 5d3961048c..aa90b60111 100644 --- a/boost/fusion/container/set/detail/set_forward_ctor.hpp +++ b/boost/fusion/container/set/detail/cpp03/set_forward_ctor.hpp @@ -13,7 +13,7 @@ #include <boost/preprocessor/repetition/enum_binary_params.hpp> #define BOOST_PP_FILENAME_1 \ - <boost/fusion/container/set/detail/set_forward_ctor.hpp> + <boost/fusion/container/set/detail/cpp03/set_forward_ctor.hpp> #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_SET_SIZE) #include BOOST_PP_ITERATE() diff --git a/boost/fusion/container/set/detail/cpp03/set_fwd.hpp b/boost/fusion/container/set/detail/cpp03/set_fwd.hpp new file mode 100644 index 0000000000..f50f6083ea --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/fusion/container/set/detail/cpp03/limits.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/set/detail/cpp03/preprocessed/set_fwd.hpp> +#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/boost/fusion/container/set/set.hpp b/boost/fusion/container/set/set.hpp index 65a080b0ab..59f4eafc02 100644 --- a/boost/fusion/container/set/set.hpp +++ b/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 <boost/fusion/support/config.hpp> -#include <boost/fusion/support/is_sequence.hpp> -#include <boost/fusion/support/sequence_base.hpp> -#include <boost/fusion/support/category_of.hpp> -#include <boost/fusion/support/detail/access.hpp> #include <boost/fusion/container/set/set_fwd.hpp> -#include <boost/fusion/container/set/detail/begin_impl.hpp> -#include <boost/fusion/container/set/detail/end_impl.hpp> -#include <boost/fusion/container/set/detail/value_of_impl.hpp> -#include <boost/fusion/container/set/detail/deref_data_impl.hpp> -#include <boost/fusion/container/set/detail/deref_impl.hpp> -#include <boost/fusion/container/set/detail/key_of_impl.hpp> -#include <boost/fusion/container/set/detail/value_of_data_impl.hpp> -#include <boost/fusion/container/vector/vector.hpp> -#include <boost/mpl/identity.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/core/enable_if.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/set/detail/preprocessed/set.hpp> -#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) +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include <boost/fusion/container/set/detail/cpp03/set.hpp> - 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 <BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, typename T)> - struct set : sequence_base<set<BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)> > - { - 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 <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - set(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) - : data(rhs) {} - - #include <boost/fusion/container/set/detail/set_forward_ctor.hpp> - - template <typename T> - 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/boost/fusion/container/set/set_fwd.hpp b/boost/fusion/container/set/set_fwd.hpp index 2de3db6d5b..50d8d1c8bd 100644 --- a/boost/fusion/container/set/set_fwd.hpp +++ b/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 <boost/config.hpp> #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/set/limits.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/set/detail/preprocessed/set_fwd.hpp> -#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! -==============================================================================*/ +/////////////////////////////////////////////////////////////////////////////// +// With no variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// +# include <boost/fusion/container/set/detail/cpp03/set_fwd.hpp> -#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/boost/fusion/container/vector.hpp b/boost/fusion/container/vector.hpp index 06fa5a04bb..a999c8b023 100644 --- a/boost/fusion/container/vector.hpp +++ b/boost/fusion/container/vector.hpp @@ -8,7 +8,7 @@ #define FUSION_SEQUENCE_CLASS_VECTOR_10022005_0602 #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/vector/limits.hpp> +#include <boost/fusion/container/vector/detail/cpp03/limits.hpp> #include <boost/fusion/container/vector/vector10.hpp> #if (FUSION_MAX_VECTOR_SIZE > 10) diff --git a/boost/fusion/container/vector/detail/as_vector.hpp b/boost/fusion/container/vector/detail/as_vector.hpp index b5f5e2d05f..eaaac89638 100644 --- a/boost/fusion/container/vector/detail/as_vector.hpp +++ b/boost/fusion/container/vector/detail/as_vector.hpp @@ -1,139 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_AS_VECTOR_09222005_0950) -#define FUSION_AS_VECTOR_09222005_0950 +#ifndef FUSION_AS_VECTOR_11052014_1801 +#define FUSION_AS_VECTOR_11052014_1801 -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/repeat.hpp> -#include <boost/preprocessor/cat.hpp> -#include <boost/preprocessor/inc.hpp> -#include <boost/preprocessor/dec.hpp> -#include <boost/fusion/container/vector/vector.hpp> -#include <boost/fusion/iterator/value_of.hpp> -#include <boost/fusion/iterator/deref.hpp> -#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/support/config.hpp> -namespace boost { namespace fusion { namespace detail -{ -BOOST_FUSION_BARRIER_BEGIN - - template <int size> - struct as_vector; - - template <> - struct as_vector<0> - { - template <typename Iterator> - struct apply - { - typedef vector0<> type; - }; - - template <typename Iterator> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static typename apply<Iterator>::type - call(Iterator) - { - return vector0<>(); - } - }; - -BOOST_FUSION_BARRIER_END -}}} - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/as_vector.hpp> -#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<BOOST_PP_CAT(I, n)>::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<BOOST_PP_CAT(I, n)>::type \ - BOOST_PP_CAT(T, n); - -#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/as_vector.hpp> -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_NEXT_ITERATOR -#undef BOOST_FUSION_NEXT_CALL_ITERATOR -#undef BOOST_FUSION_VALUE_OF_ITERATOR - -BOOST_FUSION_BARRIER_END -}}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - -#endif -#else // defined(BOOST_PP_IS_ITERATING) /////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// +// Without variadics, we will use the PP version /////////////////////////////////////////////////////////////////////////////// +# include <boost/fusion/container/vector/detail/cpp03/as_vector.hpp> -#define N BOOST_PP_ITERATION() - - template <> - struct as_vector<N> - { - template <typename I0> - 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)<BOOST_PP_ENUM_PARAMS(N, T)> type; - }; - - template <typename Iterator> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static typename apply<Iterator>::type - call(Iterator const& i0) - { - typedef apply<Iterator> 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)); - } - }; +#endif -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) diff --git a/boost/fusion/container/vector/detail/cpp03/as_vector.hpp b/boost/fusion/container/vector/detail/cpp03/as_vector.hpp new file mode 100644 index 0000000000..bd7fa76be6 --- /dev/null +++ b/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 <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/repeat.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/inc.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/iterator/value_of.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/iterator/next.hpp> + +namespace boost { namespace fusion { namespace detail +{ +BOOST_FUSION_BARRIER_BEGIN + + template <int size> + struct as_vector; + + template <> + struct as_vector<0> + { + template <typename Iterator> + struct apply + { + typedef vector0<> type; + }; + + template <typename Iterator> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static typename apply<Iterator>::type + call(Iterator) + { + return vector0<>(); + } + }; + +BOOST_FUSION_BARRIER_END +}}} + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector.hpp> +#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<BOOST_PP_CAT(I, n)>::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<BOOST_PP_CAT(I, n)>::type \ + BOOST_PP_CAT(T, n); + +#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/cpp03/as_vector.hpp> +#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<N> + { + template <typename I0> + 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)<BOOST_PP_ENUM_PARAMS(N, T)> type; + }; + + template <typename Iterator> + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + static typename apply<Iterator>::type + call(Iterator const& i0) + { + typedef apply<Iterator> 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/boost/fusion/container/vector/limits.hpp b/boost/fusion/container/vector/detail/cpp03/limits.hpp index 6e106144bb..6e106144bb 100644 --- a/boost/fusion/container/vector/limits.hpp +++ b/boost/fusion/container/vector/detail/cpp03/limits.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/as_vector.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector.hpp index c70f8a7c42..521443ef8e 100644 --- a/boost/fusion/container/vector/detail/preprocessed/as_vector.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_VECTOR_SIZE <= 10 -#include <boost/fusion/container/vector/detail/preprocessed/as_vector10.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector10.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 20 -#include <boost/fusion/container/vector/detail/preprocessed/as_vector20.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector20.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 30 -#include <boost/fusion/container/vector/detail/preprocessed/as_vector30.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector30.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 40 -#include <boost/fusion/container/vector/detail/preprocessed/as_vector40.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector40.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 50 -#include <boost/fusion/container/vector/detail/preprocessed/as_vector50.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector50.hpp> #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" #endif diff --git a/boost/fusion/container/vector/detail/preprocessed/as_vector10.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector10.hpp index 92fdbc07b4..92fdbc07b4 100644 --- a/boost/fusion/container/vector/detail/preprocessed/as_vector10.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector10.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/as_vector20.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector20.hpp index fa99a4a58b..fa99a4a58b 100644 --- a/boost/fusion/container/vector/detail/preprocessed/as_vector20.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector20.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/as_vector30.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector30.hpp index 578524a642..578524a642 100644 --- a/boost/fusion/container/vector/detail/preprocessed/as_vector30.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector30.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/as_vector40.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector40.hpp index 93d63ee2f9..93d63ee2f9 100644 --- a/boost/fusion/container/vector/detail/preprocessed/as_vector40.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector40.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/as_vector50.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector50.hpp index 6f6cc4802f..6f6cc4802f 100644 --- a/boost/fusion/container/vector/detail/preprocessed/as_vector50.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector50.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp index 040fff948b..35b8e64329 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_VECTOR_SIZE <= 10 -#include <boost/fusion/container/vector/detail/preprocessed/vvector10.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 20 -#include <boost/fusion/container/vector/detail/preprocessed/vvector20.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 30 -#include <boost/fusion/container/vector/detail/preprocessed/vvector30.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 40 -#include <boost/fusion/container/vector/detail/preprocessed/vvector40.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 50 -#include <boost/fusion/container/vector/detail/preprocessed/vvector50.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp> #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" #endif diff --git a/boost/fusion/container/vector/detail/preprocessed/vector10.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp index d5e8aad116..d5e8aad116 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector10.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector10_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp index 33f817ffaf..33f817ffaf 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector10_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector20.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp index 91a9e59c46..91a9e59c46 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector20.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector20_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp index b1672857a8..b1672857a8 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector20_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector30.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp index c823452038..c823452038 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector30.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector30_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp index 39f96aa836..39f96aa836 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector30_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector40.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp index ec16fcd94a..ec16fcd94a 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector40.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector40_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp index e1d6e0911a..e1d6e0911a 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector40_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector50.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp index 2d787edfb6..2d787edfb6 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector50.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector50_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp index 6829e9b50f..6829e9b50f 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector50_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector_chooser.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp index e956bf24e1..fb8f0e2f5b 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector_chooser.hpp +++ b/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 <boost/fusion/container/vector/detail/preprocessed/vector_chooser10.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 20 -#include <boost/fusion/container/vector/detail/preprocessed/vector_chooser20.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 30 -#include <boost/fusion/container/vector/detail/preprocessed/vector_chooser30.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 40 -#include <boost/fusion/container/vector/detail/preprocessed/vector_chooser40.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 50 -#include <boost/fusion/container/vector/detail/preprocessed/vector_chooser50.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp> #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" #endif diff --git a/boost/fusion/container/vector/detail/preprocessed/vector_chooser10.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp index d631b53208..d631b53208 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector_chooser10.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector_chooser20.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp index 9628f483ed..9628f483ed 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector_chooser20.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector_chooser30.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp index 38edabf45e..38edabf45e 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector_chooser30.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector_chooser40.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp index a784b75736..a784b75736 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector_chooser40.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector_chooser50.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp index fc9a260e20..fc9a260e20 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector_chooser50.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vector_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp index e2576f9004..42c3f5bc6c 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vector_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_VECTOR_SIZE <= 10 -#include <boost/fusion/container/vector/detail/preprocessed/vvector10_fwd.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 20 -#include <boost/fusion/container/vector/detail/preprocessed/vvector20_fwd.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 30 -#include <boost/fusion/container/vector/detail/preprocessed/vvector30_fwd.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 40 -#include <boost/fusion/container/vector/detail/preprocessed/vvector40_fwd.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp> #elif FUSION_MAX_VECTOR_SIZE <= 50 -#include <boost/fusion/container/vector/detail/preprocessed/vvector50_fwd.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp> #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" #endif diff --git a/boost/fusion/container/vector/detail/preprocessed/vvector10.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp index 792809bc9c..cd2bd58b31 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vvector10.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp @@ -38,10 +38,6 @@ namespace boost { namespace fusion vector(vector const& rhs) : vec(rhs.vec) {} template <typename Sequence> - -# if !defined(BOOST_CLANG) - BOOST_CONSTEXPR -# endif BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) diff --git a/boost/fusion/container/vector/detail/preprocessed/vvector10_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp index 97f64fa359..97f64fa359 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vvector10_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vvector20.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp index f1d01617e1..809485fe25 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vvector20.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp @@ -38,10 +38,6 @@ namespace boost { namespace fusion vector(vector const& rhs) : vec(rhs.vec) {} template <typename Sequence> - -# if !defined(BOOST_CLANG) - BOOST_CONSTEXPR -# endif BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) diff --git a/boost/fusion/container/vector/detail/preprocessed/vvector20_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp index 8d4ea992d1..8d4ea992d1 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vvector20_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vvector30.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp index dccc1f0186..3f75a05f35 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vvector30.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp @@ -38,10 +38,6 @@ namespace boost { namespace fusion vector(vector const& rhs) : vec(rhs.vec) {} template <typename Sequence> - -# if !defined(BOOST_CLANG) - BOOST_CONSTEXPR -# endif BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) diff --git a/boost/fusion/container/vector/detail/preprocessed/vvector30_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp index 03f289e9c9..03f289e9c9 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vvector30_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vvector40.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp index 442a4fe995..6c7654ccc5 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vvector40.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp @@ -38,10 +38,6 @@ namespace boost { namespace fusion vector(vector const& rhs) : vec(rhs.vec) {} template <typename Sequence> - -# if !defined(BOOST_CLANG) - BOOST_CONSTEXPR -# endif BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) diff --git a/boost/fusion/container/vector/detail/preprocessed/vvector40_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp index 55c1097a75..55c1097a75 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vvector40_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp diff --git a/boost/fusion/container/vector/detail/preprocessed/vvector50.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp index 5237a4f305..47fce0e19d 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vvector50.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp @@ -38,10 +38,6 @@ namespace boost { namespace fusion vector(vector const& rhs) : vec(rhs.vec) {} template <typename Sequence> - -# if !defined(BOOST_CLANG) - BOOST_CONSTEXPR -# endif BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) diff --git a/boost/fusion/container/vector/detail/preprocessed/vvector50_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp index 621f1606bf..621f1606bf 100644 --- a/boost/fusion/container/vector/detail/preprocessed/vvector50_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp diff --git a/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp b/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp new file mode 100644 index 0000000000..44feb6002c --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/mpl/at.hpp> + +namespace boost { namespace fusion +{ + struct vector_tag; + + namespace extension + { + template <typename Tag> + struct value_at_impl; + + template <> + struct value_at_impl<vector_tag> + { + template <typename Sequence, typename N> + struct apply + { + typedef typename mpl::at<typename Sequence::types, N>::type type; + }; + }; + } +}} + +#endif diff --git a/boost/fusion/container/vector/detail/cpp03/vector.hpp b/boost/fusion/container/vector/detail/cpp03/vector.hpp new file mode 100644 index 0000000000..5dcd688650 --- /dev/null +++ b/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 <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/fusion/support/config.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/container/vector/vector_fwd.hpp> +#include <boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/type_traits/add_reference.hpp> +#include <boost/type_traits/add_const.hpp> +#include <boost/type_traits/is_base_of.hpp> +#include <boost/detail/workaround.hpp> +#include <boost/core/enable_if.hpp> + +#define FUSION_HASH # + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) + +#define BOOST_FUSION_VECTOR_COPY_INIT() \ + ctor_helper(rhs, is_base_of<vector, Sequence>()) \ + +#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 <typename T> \ + 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 <boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp> +#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 <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)> + struct vector + : sequence_base<vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> > + { + private: + + typedef typename detail::vector_n_chooser< + BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type + vector_n; + + template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)> + 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_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs) + : vec(rhs.vec) {} + + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector(vector const& rhs) + : vec(rhs.vec) {} + + template <typename Sequence> + BOOST_FUSION_GPU_ENABLED + vector(Sequence const& rhs, + typename boost::enable_if<traits::is_sequence<Sequence> >::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<T0>::type arg0 + // , typename detail::call_param<T1>::type arg1) + // : vec(arg0, arg1) {} + #include <boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp> + + template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)> + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector& + operator=(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs) + { + vec = rhs.vec; + return *this; + } + + template <typename T> + 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<vector_n>(rhs.vec)) {} + + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector& + operator=(vector&& rhs) + { + vec = std::forward<vector_n>(rhs.vec); + return *this; + } + + template <typename T> + 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 <int N> + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename add_reference< + typename mpl::at_c<types, N>::type + >::type + at_impl(mpl::int_<N> index) + { + return vec.at_impl(index); + } + + template <int N> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename add_reference< + typename add_const< + typename mpl::at_c<types, N>::type + >::type + >::type + at_impl(mpl::int_<N> index) const + { + return vec.at_impl(index); + } + + template <typename I> + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename add_reference< + typename mpl::at<types, I>::type + >::type + at_impl(I /*index*/) + { + return vec.at_impl(mpl::int_<I::value>()); + } + + template<typename I> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + typename add_reference< + typename add_const< + typename mpl::at<types, I>::type + >::type + >::type + at_impl(I /*index*/) const + { + return vec.at_impl(mpl::int_<I::value>()); + } + + 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/boost/fusion/container/vector/detail/cpp03/vector10.hpp b/boost/fusion/container/vector/detail/cpp03/vector10.hpp new file mode 100644 index 0000000000..58a31ddec3 --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp> +#include <boost/fusion/support/sequence_base.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/support/detail/access.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/container/vector/detail/at_impl.hpp> +#include <boost/fusion/container/vector/detail/value_at_impl.hpp> +#include <boost/fusion/container/vector/detail/begin_impl.hpp> +#include <boost/fusion/container/vector/detail/end_impl.hpp> + +#include <boost/mpl/void.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/vector/vector10.hpp> +#include <boost/type_traits/is_convertible.hpp> +#include <boost/utility/enable_if.hpp> + +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/iteration/iterate.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_shifted.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> + +namespace boost { namespace fusion +{ + struct vector_tag; + struct fusion_sequence_tag; + struct random_access_traversal_tag; + + template <typename Dummy> + struct vector0 : sequence_base<vector0<Dummy> > + { + 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<typename Sequence> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector0(Sequence const& /*seq*/) BOOST_NOEXCEPT + {} + }; +}} + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp> +#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 <boost/fusion/container/vector/detail/cpp03/vector_n.hpp> +#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/boost/fusion/container/vector/vector10_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp index ce5cb1e806..d221faece2 100644 --- a/boost/fusion/container/vector/vector10_fwd.hpp +++ b/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 <boost/fusion/container/vector/detail/preprocessed/vector10_fwd.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp> #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 <boost/fusion/container/vector/vector10_fwd.hpp> + #define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp> #define BOOST_PP_ITERATION_LIMITS (1, 10) #include BOOST_PP_ITERATE() }} diff --git a/boost/fusion/container/vector/detail/cpp03/vector20.hpp b/boost/fusion/container/vector/detail/cpp03/vector20.hpp new file mode 100644 index 0000000000..89f644c5a4 --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp> +#include <boost/fusion/support/sequence_base.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/support/detail/access.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/container/vector/detail/at_impl.hpp> +#include <boost/fusion/container/vector/detail/value_at_impl.hpp> +#include <boost/fusion/container/vector/detail/begin_impl.hpp> +#include <boost/fusion/container/vector/detail/end_impl.hpp> + +#include <boost/mpl/void.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/vector/vector20.hpp> +#include <boost/type_traits/is_convertible.hpp> +#include <boost/utility/enable_if.hpp> + +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/iteration/iterate.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_shifted.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp> +#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 <boost/fusion/container/vector/detail/cpp03/vector_n.hpp> +#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/boost/fusion/container/vector/vector20_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp index bf1b39b454..e69b59f4a6 100644 --- a/boost/fusion/container/vector/vector20_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp @@ -15,10 +15,10 @@ #include <boost/preprocessor/repetition/enum_params.hpp> #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/vector20_fwd.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp> #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 <boost/fusion/container/vector/vector20_fwd.hpp> + #define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp> #define BOOST_PP_ITERATION_LIMITS (11, 20) #include BOOST_PP_ITERATE() }} diff --git a/boost/fusion/container/vector/detail/cpp03/vector30.hpp b/boost/fusion/container/vector/detail/cpp03/vector30.hpp new file mode 100644 index 0000000000..ad838c9ac6 --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp> +#include <boost/fusion/support/sequence_base.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/support/detail/access.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/container/vector/detail/at_impl.hpp> +#include <boost/fusion/container/vector/detail/value_at_impl.hpp> +#include <boost/fusion/container/vector/detail/begin_impl.hpp> +#include <boost/fusion/container/vector/detail/end_impl.hpp> + +#include <boost/mpl/void.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/vector/vector30.hpp> +#include <boost/type_traits/is_convertible.hpp> +#include <boost/utility/enable_if.hpp> + +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/iteration/iterate.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_shifted.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp> +#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 <boost/fusion/container/vector/detail/cpp03/vector_n.hpp> +#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/boost/fusion/container/vector/vector30_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp index 23b38569e5..e799b09657 100644 --- a/boost/fusion/container/vector/vector30_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp @@ -15,10 +15,10 @@ #include <boost/preprocessor/repetition/enum_params.hpp> #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/vector30_fwd.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp> #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 <boost/fusion/container/vector/vector30_fwd.hpp> + #define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp> #define BOOST_PP_ITERATION_LIMITS (21, 30) #include BOOST_PP_ITERATE() }} diff --git a/boost/fusion/container/vector/detail/cpp03/vector40.hpp b/boost/fusion/container/vector/detail/cpp03/vector40.hpp new file mode 100644 index 0000000000..10770907eb --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp> +#include <boost/fusion/support/sequence_base.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/support/detail/access.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/container/vector/detail/at_impl.hpp> +#include <boost/fusion/container/vector/detail/value_at_impl.hpp> +#include <boost/fusion/container/vector/detail/begin_impl.hpp> +#include <boost/fusion/container/vector/detail/end_impl.hpp> + +#include <boost/mpl/void.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/vector/vector40.hpp> +#include <boost/type_traits/is_convertible.hpp> +#include <boost/utility/enable_if.hpp> + +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/iteration/iterate.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_shifted.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp> +#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 <boost/fusion/container/vector/detail/cpp03/vector_n.hpp> +#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/boost/fusion/container/vector/vector40_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp index fc3d29d195..790dd76135 100644 --- a/boost/fusion/container/vector/vector40_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp @@ -15,10 +15,10 @@ #include <boost/preprocessor/repetition/enum_params.hpp> #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/vector40_fwd.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp> #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 <boost/fusion/container/vector/vector40_fwd.hpp> + #define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp> #define BOOST_PP_ITERATION_LIMITS (31, 40) #include BOOST_PP_ITERATE() }} diff --git a/boost/fusion/container/vector/detail/cpp03/vector50.hpp b/boost/fusion/container/vector/detail/cpp03/vector50.hpp new file mode 100644 index 0000000000..6c0b48bbc4 --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp> +#include <boost/fusion/support/sequence_base.hpp> +#include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/support/detail/access.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/sequence/intrinsic/begin.hpp> +#include <boost/fusion/container/vector/detail/at_impl.hpp> +#include <boost/fusion/container/vector/detail/value_at_impl.hpp> +#include <boost/fusion/container/vector/detail/begin_impl.hpp> +#include <boost/fusion/container/vector/detail/end_impl.hpp> + +#include <boost/mpl/void.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/vector/vector50.hpp> +#include <boost/type_traits/is_convertible.hpp> +#include <boost/utility/enable_if.hpp> + +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/iteration/iterate.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_shifted.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp> +#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 <boost/fusion/container/vector/detail/cpp03/vector_n.hpp> +#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/boost/fusion/container/vector/vector50_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp index 52083ad47c..4ec5e2812c 100644 --- a/boost/fusion/container/vector/vector50_fwd.hpp +++ b/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp @@ -15,10 +15,10 @@ #include <boost/preprocessor/repetition/enum_params.hpp> #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/vector50_fwd.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp> #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 <boost/fusion/container/vector/vector50_fwd.hpp> + #define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp> #define BOOST_PP_ITERATION_LIMITS (41, 50) #include BOOST_PP_ITERATE() }} diff --git a/boost/fusion/container/vector/detail/vector_forward_ctor.hpp b/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp index 8ec636074e..682f0ce367 100644 --- a/boost/fusion/container/vector/detail/vector_forward_ctor.hpp +++ b/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 \ - <boost/fusion/container/vector/detail/vector_forward_ctor.hpp> + <boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp> #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) #include BOOST_PP_ITERATE() diff --git a/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp b/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp new file mode 100644 index 0000000000..f894b1a699 --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/fusion/container/vector/detail/cpp03/limits.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> + +#include <boost/fusion/container/vector/detail/cpp03/vector10.hpp> +#if (FUSION_MAX_VECTOR_SIZE > 10) +#include <boost/fusion/container/vector/detail/cpp03/vector20.hpp> +#endif +#if (FUSION_MAX_VECTOR_SIZE > 20) +#include <boost/fusion/container/vector/detail/cpp03/vector30.hpp> +#endif +#if (FUSION_MAX_VECTOR_SIZE > 30) +#include <boost/fusion/container/vector/detail/cpp03/vector40.hpp> +#endif +#if (FUSION_MAX_VECTOR_SIZE > 40) +#include <boost/fusion/container/vector/detail/cpp03/vector50.hpp> +#endif + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp> +#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/boost/fusion/container/vector/detail/vector_n.hpp b/boost/fusion/container/vector/detail/cpp03/vector_n.hpp index 932ce36c7d..932ce36c7d 100644 --- a/boost/fusion/container/vector/detail/vector_n.hpp +++ b/boost/fusion/container/vector/detail/cpp03/vector_n.hpp diff --git a/boost/fusion/container/vector/detail/vector_n_chooser.hpp b/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp index b0e69afc79..002889ceb5 100644 --- a/boost/fusion/container/vector/detail/vector_n_chooser.hpp +++ b/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 <boost/fusion/container/vector/limits.hpp> +#include <boost/fusion/container/vector/detail/cpp03/limits.hpp> // include vector0..N where N is FUSION_MAX_VECTOR_SIZE -#include <boost/fusion/container/vector/vector10.hpp> +#include <boost/fusion/container/vector/detail/cpp03/vector10.hpp> #if (FUSION_MAX_VECTOR_SIZE > 10) -#include <boost/fusion/container/vector/vector20.hpp> +#include <boost/fusion/container/vector/detail/cpp03/vector20.hpp> #endif #if (FUSION_MAX_VECTOR_SIZE > 20) -#include <boost/fusion/container/vector/vector30.hpp> +#include <boost/fusion/container/vector/detail/cpp03/vector30.hpp> #endif #if (FUSION_MAX_VECTOR_SIZE > 30) -#include <boost/fusion/container/vector/vector40.hpp> +#include <boost/fusion/container/vector/detail/cpp03/vector40.hpp> #endif #if (FUSION_MAX_VECTOR_SIZE > 40) -#include <boost/fusion/container/vector/vector50.hpp> +#include <boost/fusion/container/vector/detail/cpp03/vector50.hpp> #endif #include <boost/preprocessor/cat.hpp> @@ -38,7 +38,7 @@ namespace boost { namespace fusion }} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/vector_chooser.hpp> +#include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp> #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 \ - <boost/fusion/container/vector/detail/vector_n_chooser.hpp> + <boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp> #define BOOST_PP_ITERATION_LIMITS (1, BOOST_PP_DEC(FUSION_MAX_VECTOR_SIZE)) #include BOOST_PP_ITERATE() diff --git a/boost/fusion/container/vector/detail/value_at_impl.hpp b/boost/fusion/container/vector/detail/value_at_impl.hpp index 06402b43ee..f71ca8486d 100644 --- a/boost/fusion/container/vector/detail/value_at_impl.hpp +++ b/boost/fusion/container/vector/detail/value_at_impl.hpp @@ -1,34 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#if !defined(FUSION_VALUE_AT_IMPL_05052005_0232) -#define FUSION_VALUE_AT_IMPL_05052005_0232 +#ifndef FUSION_VALUE_AT_IMPL_16122014_1641 +#define FUSION_VALUE_AT_IMPL_16122014_1641 +#include <boost/config.hpp> #include <boost/fusion/support/config.hpp> -#include <boost/mpl/at.hpp> -namespace boost { namespace fusion -{ - struct vector_tag; - - namespace extension - { - template <typename Tag> - struct value_at_impl; - - template <> - struct value_at_impl<vector_tag> - { - template <typename Sequence, typename N> - struct apply - { - typedef typename mpl::at<typename Sequence::types, N>::type type; - }; - }; - } -}} +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include <boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp> #endif + diff --git a/boost/fusion/container/vector/vector.hpp b/boost/fusion/container/vector/vector.hpp index c1cea9159e..2b9f0ce5ca 100644 --- a/boost/fusion/container/vector/vector.hpp +++ b/boost/fusion/container/vector/vector.hpp @@ -1,257 +1,20 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#if !defined(FUSION_VECTOR_07072005_1244) -#define FUSION_VECTOR_07072005_1244 +#ifndef FUSION_VECTOR_11052014_1625 +#define FUSION_VECTOR_11052014_1625 -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/config.hpp> #include <boost/fusion/support/config.hpp> -#include <boost/fusion/support/is_sequence.hpp> #include <boost/fusion/container/vector/vector_fwd.hpp> -#include <boost/fusion/container/vector/detail/vector_n_chooser.hpp> -#include <boost/fusion/sequence/intrinsic/begin.hpp> -#include <boost/mpl/at.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/type_traits/add_reference.hpp> -#include <boost/type_traits/add_const.hpp> -#include <boost/type_traits/is_base_of.hpp> -#include <boost/detail/workaround.hpp> -#include <boost/core/enable_if.hpp> -#define FUSION_HASH # - -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) - -#define BOOST_FUSION_VECTOR_COPY_INIT() \ - ctor_helper(rhs, is_base_of<vector, Sequence>()) \ - -#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 <typename T> \ - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ - static T const& \ - ctor_helper(T const& rhs, mpl::false_) \ - { \ - return rhs; \ - } - -#else - -#define BOOST_FUSION_VECTOR_COPY_INIT() \ - rhs \ - -#define BOOST_FUSION_VECTOR_CTOR_HELPER() +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include <boost/fusion/container/vector/detail/cpp03/vector.hpp> #endif -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/vector.hpp> -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vvector" FUSION_MAX_VECTOR_SIZE_STR ".hpp") -#endif - -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct void_; - struct fusion_sequence_tag; - - template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)> - struct vector - : sequence_base<vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> > - { - private: - - typedef typename detail::vector_n_chooser< - BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type - vector_n; - - template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)> - 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_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs) - : vec(rhs.vec) {} - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector(vector const& rhs) - : vec(rhs.vec) {} - - template <typename Sequence> - // 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<traits::is_sequence<Sequence> >::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<T0>::type arg0 - // , typename detail::call_param<T1>::type arg1) - // : vec(arg0, arg1) {} - #include <boost/fusion/container/vector/detail/vector_forward_ctor.hpp> - - template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& - operator=(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs) - { - vec = rhs.vec; - return *this; - } - - template <typename T> - 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<vector_n>(rhs.vec)) {} - - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& - operator=(vector&& rhs) - { - vec = std::forward<vector_n>(rhs.vec); - return *this; - } - - template <typename T> - 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 <int N> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - typename add_reference< - typename mpl::at_c<types, N>::type - >::type - at_impl(mpl::int_<N> index) - { - return vec.at_impl(index); - } - - template <int N> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - typename add_reference< - typename add_const< - typename mpl::at_c<types, N>::type - >::type - >::type - at_impl(mpl::int_<N> index) const - { - return vec.at_impl(index); - } - - template <typename I> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - typename add_reference< - typename mpl::at<types, I>::type - >::type - at_impl(I /*index*/) - { - return vec.at_impl(mpl::int_<I::value>()); - } - - template<typename I> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - typename add_reference< - typename add_const< - typename mpl::at<types, I>::type - >::type - >::type - at_impl(I /*index*/) const - { - return vec.at_impl(mpl::int_<I::value>()); - } - - 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/boost/fusion/container/vector/vector10.hpp b/boost/fusion/container/vector/vector10.hpp index a5ef47542d..f152bfe161 100644 --- a/boost/fusion/container/vector/vector10.hpp +++ b/boost/fusion/container/vector/vector10.hpp @@ -1,105 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#if !defined(FUSION_VECTOR10_05042005_0257) -#define FUSION_VECTOR10_05042005_0257 +#ifndef FUSION_VECTOR10_11052014_2316 +#define FUSION_VECTOR10_11052014_2316 +#include <boost/config.hpp> #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/vector/vector10_fwd.hpp> -#include <boost/fusion/support/sequence_base.hpp> -#include <boost/fusion/support/is_sequence.hpp> -#include <boost/fusion/support/detail/access.hpp> -#include <boost/fusion/iterator/next.hpp> -#include <boost/fusion/iterator/deref.hpp> -#include <boost/fusion/sequence/intrinsic/begin.hpp> -#include <boost/fusion/container/vector/detail/at_impl.hpp> -#include <boost/fusion/container/vector/detail/value_at_impl.hpp> -#include <boost/fusion/container/vector/detail/begin_impl.hpp> -#include <boost/fusion/container/vector/detail/end_impl.hpp> -#include <boost/mpl/void.hpp> -#include <boost/mpl/int.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/mpl/at.hpp> -#include <boost/mpl/vector/vector10.hpp> -#include <boost/type_traits/is_convertible.hpp> -#include <boost/utility/enable_if.hpp> +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include <boost/fusion/container/vector/detail/cpp03/vector10.hpp> -#include <boost/preprocessor/dec.hpp> -#include <boost/preprocessor/iteration/iterate.hpp> -#include <boost/preprocessor/repetition/enum.hpp> -#include <boost/preprocessor/repetition/enum_shifted.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/repeat_from_to.hpp> - -namespace boost { namespace fusion -{ - struct vector_tag; - struct fusion_sequence_tag; - struct random_access_traversal_tag; - - template <typename Dummy> - struct vector0 : sequence_base<vector0<Dummy> > - { - 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<typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector0(Sequence const& /*seq*/) BOOST_NOEXCEPT - {} - }; -}} - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/vector10.hpp> -#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 <boost/fusion/container/vector/detail/vector_n.hpp> -#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/boost/fusion/container/vector/vector20.hpp b/boost/fusion/container/vector/vector20.hpp index 61978dcb48..c5be355df6 100644 --- a/boost/fusion/container/vector/vector20.hpp +++ b/boost/fusion/container/vector/vector20.hpp @@ -1,81 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#if !defined(FUSION_VECTOR20_05052005_0205) -#define FUSION_VECTOR20_05052005_0205 +#ifndef FUSION_VECTOR20_11052014_2316 +#define FUSION_VECTOR20_11052014_2316 +#include <boost/config.hpp> #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/vector/vector20_fwd.hpp> -#include <boost/fusion/support/sequence_base.hpp> -#include <boost/fusion/support/is_sequence.hpp> -#include <boost/fusion/support/detail/access.hpp> -#include <boost/fusion/iterator/next.hpp> -#include <boost/fusion/iterator/deref.hpp> -#include <boost/fusion/sequence/intrinsic/begin.hpp> -#include <boost/fusion/container/vector/detail/at_impl.hpp> -#include <boost/fusion/container/vector/detail/value_at_impl.hpp> -#include <boost/fusion/container/vector/detail/begin_impl.hpp> -#include <boost/fusion/container/vector/detail/end_impl.hpp> -#include <boost/mpl/void.hpp> -#include <boost/mpl/int.hpp> -#include <boost/mpl/at.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/mpl/vector/vector20.hpp> -#include <boost/type_traits/is_convertible.hpp> -#include <boost/utility/enable_if.hpp> - -#include <boost/preprocessor/dec.hpp> -#include <boost/preprocessor/iteration/iterate.hpp> -#include <boost/preprocessor/repetition/enum.hpp> -#include <boost/preprocessor/repetition/enum_shifted.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/repeat_from_to.hpp> - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/vector20.hpp> -#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 <boost/fusion/container/vector/detail/vector_n.hpp> -#define BOOST_PP_ITERATION_LIMITS (11, 20) -#include BOOST_PP_ITERATE() -#undef FUSION_HASH -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include <boost/fusion/container/vector/detail/cpp03/vector20.hpp> #endif diff --git a/boost/fusion/container/vector/vector30.hpp b/boost/fusion/container/vector/vector30.hpp index f034abd5e5..1a528cb578 100644 --- a/boost/fusion/container/vector/vector30.hpp +++ b/boost/fusion/container/vector/vector30.hpp @@ -1,80 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#if !defined(FUSION_VECTOR30_05052005_0206) -#define FUSION_VECTOR30_05052005_0206 +#ifndef FUSION_VECTOR30_11052014_2316 +#define FUSION_VECTOR30_11052014_2316 +#include <boost/config.hpp> #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/vector/vector30_fwd.hpp> -#include <boost/fusion/support/sequence_base.hpp> -#include <boost/fusion/support/is_sequence.hpp> -#include <boost/fusion/support/detail/access.hpp> -#include <boost/fusion/iterator/next.hpp> -#include <boost/fusion/iterator/deref.hpp> -#include <boost/fusion/sequence/intrinsic/begin.hpp> -#include <boost/fusion/container/vector/detail/at_impl.hpp> -#include <boost/fusion/container/vector/detail/value_at_impl.hpp> -#include <boost/fusion/container/vector/detail/begin_impl.hpp> -#include <boost/fusion/container/vector/detail/end_impl.hpp> -#include <boost/mpl/void.hpp> -#include <boost/mpl/int.hpp> -#include <boost/mpl/at.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/mpl/vector/vector30.hpp> -#include <boost/type_traits/is_convertible.hpp> -#include <boost/utility/enable_if.hpp> - -#include <boost/preprocessor/dec.hpp> -#include <boost/preprocessor/iteration/iterate.hpp> -#include <boost/preprocessor/repetition/enum.hpp> -#include <boost/preprocessor/repetition/enum_shifted.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/repeat_from_to.hpp> - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/vector30.hpp> -#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 <boost/fusion/container/vector/detail/vector_n.hpp> -#define BOOST_PP_ITERATION_LIMITS (21, 30) -#include BOOST_PP_ITERATE() -#undef FUSION_HASH -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include <boost/fusion/container/vector/detail/cpp03/vector30.hpp> #endif diff --git a/boost/fusion/container/vector/vector40.hpp b/boost/fusion/container/vector/vector40.hpp index 5a7bb44cf7..5faa7d595b 100644 --- a/boost/fusion/container/vector/vector40.hpp +++ b/boost/fusion/container/vector/vector40.hpp @@ -1,81 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#if !defined(FUSION_VECTOR40_05052005_0208) -#define FUSION_VECTOR40_05052005_0208 +#ifndef FUSION_VECTOR40_11052014_2316 +#define FUSION_VECTOR40_11052014_2316 +#include <boost/config.hpp> #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/vector/vector40_fwd.hpp> -#include <boost/fusion/support/sequence_base.hpp> -#include <boost/fusion/support/is_sequence.hpp> -#include <boost/fusion/support/detail/access.hpp> -#include <boost/fusion/iterator/next.hpp> -#include <boost/fusion/iterator/deref.hpp> -#include <boost/fusion/sequence/intrinsic/begin.hpp> -#include <boost/fusion/container/vector/detail/at_impl.hpp> -#include <boost/fusion/container/vector/detail/value_at_impl.hpp> -#include <boost/fusion/container/vector/detail/begin_impl.hpp> -#include <boost/fusion/container/vector/detail/end_impl.hpp> -#include <boost/mpl/void.hpp> -#include <boost/mpl/int.hpp> -#include <boost/mpl/at.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/mpl/vector/vector40.hpp> -#include <boost/type_traits/is_convertible.hpp> -#include <boost/utility/enable_if.hpp> - -#include <boost/preprocessor/dec.hpp> -#include <boost/preprocessor/iteration/iterate.hpp> -#include <boost/preprocessor/repetition/enum.hpp> -#include <boost/preprocessor/repetition/enum_shifted.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/repeat_from_to.hpp> - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/vector40.hpp> -#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 <boost/fusion/container/vector/detail/vector_n.hpp> -#define BOOST_PP_ITERATION_LIMITS (31, 40) -#include BOOST_PP_ITERATE() -#undef FUSION_HASH -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include <boost/fusion/container/vector/detail/cpp03/vector40.hpp> #endif diff --git a/boost/fusion/container/vector/vector50.hpp b/boost/fusion/container/vector/vector50.hpp index 2448d51e11..7b7e7a8a18 100644 --- a/boost/fusion/container/vector/vector50.hpp +++ b/boost/fusion/container/vector/vector50.hpp @@ -1,80 +1,19 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#if !defined(FUSION_VECTOR50_05052005_0207) -#define FUSION_VECTOR50_05052005_0207 +#ifndef FUSION_VECTOR50_11052014_2316 +#define FUSION_VECTOR50_11052014_2316 +#include <boost/config.hpp> #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/vector/vector50_fwd.hpp> -#include <boost/fusion/support/sequence_base.hpp> -#include <boost/fusion/support/is_sequence.hpp> -#include <boost/fusion/support/detail/access.hpp> -#include <boost/fusion/iterator/next.hpp> -#include <boost/fusion/iterator/deref.hpp> -#include <boost/fusion/sequence/intrinsic/begin.hpp> -#include <boost/fusion/container/vector/detail/at_impl.hpp> -#include <boost/fusion/container/vector/detail/value_at_impl.hpp> -#include <boost/fusion/container/vector/detail/begin_impl.hpp> -#include <boost/fusion/container/vector/detail/end_impl.hpp> -#include <boost/mpl/void.hpp> -#include <boost/mpl/int.hpp> -#include <boost/mpl/at.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/mpl/vector/vector50.hpp> -#include <boost/type_traits/is_convertible.hpp> -#include <boost/utility/enable_if.hpp> - -#include <boost/preprocessor/dec.hpp> -#include <boost/preprocessor/iteration/iterate.hpp> -#include <boost/preprocessor/repetition/enum.hpp> -#include <boost/preprocessor/repetition/enum_shifted.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/repeat_from_to.hpp> - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/vector50.hpp> -#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 <boost/fusion/container/vector/detail/vector_n.hpp> -#define BOOST_PP_ITERATION_LIMITS (41, 50) -#include BOOST_PP_ITERATE() -#undef FUSION_HASH -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +# include <boost/fusion/container/vector/detail/cpp03/vector50.hpp> #endif diff --git a/boost/fusion/container/vector/vector_fwd.hpp b/boost/fusion/container/vector/vector_fwd.hpp index d157ea81f8..b63099ce9d 100644 --- a/boost/fusion/container/vector/vector_fwd.hpp +++ b/boost/fusion/container/vector/vector_fwd.hpp @@ -1,66 +1,19 @@ /*============================================================================= - Copyright (c) 1999-2003 Jaakko Jarvi - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2014 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#if !defined(FUSION_VECTOR_FORWARD_07072005_0125) -#define FUSION_VECTOR_FORWARD_07072005_0125 +#ifndef FUSION_VECTOR_FORWARD_11052014_1626 +#define FUSION_VECTOR_FORWARD_11052014_1626 +#include <boost/config.hpp> #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/vector/limits.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -#include <boost/fusion/container/vector/vector10.hpp> -#if (FUSION_MAX_VECTOR_SIZE > 10) -#include <boost/fusion/container/vector/vector20.hpp> -#endif -#if (FUSION_MAX_VECTOR_SIZE > 20) -#include <boost/fusion/container/vector/vector30.hpp> -#endif -#if (FUSION_MAX_VECTOR_SIZE > 30) -#include <boost/fusion/container/vector/vector40.hpp> -#endif -#if (FUSION_MAX_VECTOR_SIZE > 40) -#include <boost/fusion/container/vector/vector50.hpp> -#endif +/////////////////////////////////////////////////////////////////////////////// +// With no variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// +# include <boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/container/vector/detail/preprocessed/vector_fwd.hpp> -#else -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/vvector" FUSION_MAX_VECTOR_SIZE_STR "_fwd.hpp") #endif -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif - -namespace boost { namespace fusion -{ - struct void_; - - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_VECTOR_SIZE, typename T, void_) - > - struct vector; -}} - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) -#endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - -#endif diff --git a/boost/fusion/functional/adapter/limits.hpp b/boost/fusion/functional/adapter/limits.hpp index 783bc63275..cdcdf8210e 100644 --- a/boost/fusion/functional/adapter/limits.hpp +++ b/boost/fusion/functional/adapter/limits.hpp @@ -9,7 +9,7 @@ #if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED) # define BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED -# include <boost/fusion/container/vector/limits.hpp> +# include <boost/fusion/container/vector/detail/cpp03/limits.hpp> # if !defined(BOOST_FUSION_UNFUSED_MAX_ARITY) # define BOOST_FUSION_UNFUSED_MAX_ARITY 6 diff --git a/boost/fusion/functional/invocation/detail/that_ptr.hpp b/boost/fusion/functional/invocation/detail/that_ptr.hpp index 7a1a5c5700..33ee93bf38 100644 --- a/boost/fusion/functional/invocation/detail/that_ptr.hpp +++ b/boost/fusion/functional/invocation/detail/that_ptr.hpp @@ -12,7 +12,6 @@ #include <boost/fusion/support/config.hpp> #include <boost/get_pointer.hpp> #include <boost/utility/addressof.hpp> -#include <boost/type_traits/config.hpp> #include <boost/type_traits/remove_reference.hpp> namespace boost { namespace fusion { namespace detail @@ -61,10 +60,16 @@ namespace boost { namespace fusion { namespace detail template <typename PtrOrSmartPtr> 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/boost/fusion/sequence/comparison/less_equal.hpp b/boost/fusion/sequence/comparison/less_equal.hpp index 53159926c8..c5dfa8d5c7 100644 --- a/boost/fusion/sequence/comparison/less_equal.hpp +++ b/boost/fusion/sequence/comparison/less_equal.hpp @@ -13,7 +13,6 @@ #include <boost/fusion/sequence/intrinsic/end.hpp> #include <boost/fusion/sequence/intrinsic/size.hpp> #include <boost/fusion/sequence/comparison/enable_comparison.hpp> -#include <boost/fusion/support/is_sequence.hpp> #if defined(FUSION_DIRECT_OPERATOR_USAGE) #include <boost/fusion/sequence/comparison/detail/less_equal.hpp> @@ -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 <typename Seq1, typename Seq2> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline bool - operator<=(sequence_base<Seq1> const& a, sequence_base<Seq2> const& b) - { - return less_equal(a.derived(), b.derived()); - } - - template <typename Seq1, typename Seq2> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline typename disable_if<traits::is_native_fusion_sequence<Seq2>, bool>::type - operator<=(sequence_base<Seq1> const& a, Seq2 const& b) - { - return less_equal(a.derived(), b); - } - - template <typename Seq1, typename Seq2> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline typename disable_if<traits::is_native_fusion_sequence<Seq1>, bool>::type - operator<=(Seq1 const& a, sequence_base<Seq2> 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 <typename Seq1, typename Seq2> 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/boost/fusion/sequence/intrinsic/at.hpp b/boost/fusion/sequence/intrinsic/at.hpp index fdfa72a60a..a103e078a2 100644 --- a/boost/fusion/sequence/intrinsic/at.hpp +++ b/boost/fusion/sequence/intrinsic/at.hpp @@ -10,12 +10,13 @@ #include <boost/fusion/support/config.hpp> #include <boost/mpl/int.hpp> #include <boost/mpl/if.hpp> +#include <boost/mpl/or.hpp> #include <boost/mpl/less.hpp> #include <boost/mpl/empty_base.hpp> #include <boost/type_traits/is_const.hpp> #include <boost/fusion/sequence/intrinsic_fwd.hpp> #include <boost/fusion/support/tag_of.hpp> -#include <boost/fusion/support/detail/access.hpp> +#include <boost/fusion/support/category_of.hpp> namespace boost { namespace fusion { @@ -64,7 +65,10 @@ namespace boost { namespace fusion template <typename Sequence, typename N, typename Tag> struct at_impl : mpl::if_< - mpl::less<N, typename extension::size_impl<Tag>::template apply<Sequence>::type> + mpl::or_< + mpl::less<N, typename extension::size_impl<Tag>::template apply<Sequence>::type> + , traits::is_unbounded<Sequence> + > , typename extension::at_impl<Tag>::template apply<Sequence, N> , mpl::empty_base >::type diff --git a/boost/fusion/sequence/intrinsic/at_key.hpp b/boost/fusion/sequence/intrinsic/at_key.hpp index 4693a90553..9454cb56f7 100644 --- a/boost/fusion/sequence/intrinsic/at_key.hpp +++ b/boost/fusion/sequence/intrinsic/at_key.hpp @@ -11,10 +11,15 @@ #include <boost/fusion/support/config.hpp> #include <boost/type_traits/is_const.hpp> #include <boost/fusion/sequence/intrinsic_fwd.hpp> +#include <boost/fusion/sequence/intrinsic/has_key.hpp> #include <boost/fusion/algorithm/query/find.hpp> #include <boost/fusion/iterator/deref_data.hpp> #include <boost/fusion/support/tag_of.hpp> +#include <boost/fusion/support/category_of.hpp> #include <boost/fusion/support/detail/access.hpp> +#include <boost/mpl/empty_base.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/or.hpp> namespace boost { namespace fusion { @@ -64,12 +69,26 @@ namespace boost { namespace fusion struct at_key_impl<std_pair_tag>; } + namespace detail + { + template <typename Sequence, typename Key, typename Tag> + struct at_key_impl + : mpl::if_< + mpl::or_< + typename extension::has_key_impl<Tag>::template apply<Sequence, Key> + , traits::is_unbounded<Sequence> + > + , typename extension::at_key_impl<Tag>::template apply<Sequence, Key> + , mpl::empty_base + >::type + {}; + } + namespace result_of { template <typename Sequence, typename Key> struct at_key - : extension::at_key_impl<typename detail::tag_of<Sequence>::type>:: - template apply<Sequence, Key> + : detail::at_key_impl<Sequence, Key, typename detail::tag_of<Sequence>::type> {}; } diff --git a/boost/fusion/sequence/intrinsic/value_at.hpp b/boost/fusion/sequence/intrinsic/value_at.hpp index 362669b521..152f0c9455 100644 --- a/boost/fusion/sequence/intrinsic/value_at.hpp +++ b/boost/fusion/sequence/intrinsic/value_at.hpp @@ -9,8 +9,13 @@ #include <boost/fusion/support/config.hpp> #include <boost/mpl/int.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/or.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/empty_base.hpp> #include <boost/fusion/sequence/intrinsic_fwd.hpp> #include <boost/fusion/support/tag_of.hpp> +#include <boost/fusion/support/category_of.hpp> namespace boost { namespace fusion { @@ -50,12 +55,26 @@ namespace boost { namespace fusion struct value_at_impl<std_pair_tag>; } + namespace detail + { + template <typename Sequence, typename N, typename Tag> + struct value_at_impl + : mpl::if_< + mpl::or_< + mpl::less<N, typename extension::size_impl<Tag>::template apply<Sequence>::type> + , traits::is_unbounded<Sequence> + > + , typename extension::value_at_impl<Tag>::template apply<Sequence, N> + , mpl::empty_base + >::type + {}; + } + namespace result_of { template <typename Sequence, typename N> struct value_at - : extension::value_at_impl<typename detail::tag_of<Sequence>::type>:: - template apply<Sequence, N> + : detail::value_at_impl<Sequence, N, typename detail::tag_of<Sequence>::type> {}; template <typename Sequence, int N> diff --git a/boost/fusion/sequence/intrinsic/value_at_key.hpp b/boost/fusion/sequence/intrinsic/value_at_key.hpp index 6d8be3fbcd..76baf1b8ac 100644 --- a/boost/fusion/sequence/intrinsic/value_at_key.hpp +++ b/boost/fusion/sequence/intrinsic/value_at_key.hpp @@ -10,10 +10,15 @@ #include <boost/fusion/support/config.hpp> #include <boost/mpl/int.hpp> +#include <boost/mpl/empty_base.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/or.hpp> #include <boost/fusion/sequence/intrinsic_fwd.hpp> +#include <boost/fusion/sequence/intrinsic/has_key.hpp> #include <boost/fusion/iterator/value_of_data.hpp> #include <boost/fusion/algorithm/query/find.hpp> #include <boost/fusion/support/tag_of.hpp> +#include <boost/fusion/support/category_of.hpp> namespace boost { namespace fusion { @@ -52,13 +57,27 @@ namespace boost { namespace fusion template <> struct value_at_key_impl<std_pair_tag>; } - + + namespace detail + { + template <typename Sequence, typename N, typename Tag> + struct value_at_key_impl + : mpl::if_< + mpl::or_< + typename extension::has_key_impl<Tag>::template apply<Sequence, N> + , traits::is_unbounded<Sequence> + > + , typename extension::value_at_key_impl<Tag>::template apply<Sequence, N> + , mpl::empty_base + >::type + {}; + } + namespace result_of { template <typename Sequence, typename N> struct value_at_key - : extension::value_at_key_impl<typename detail::tag_of<Sequence>::type>:: - template apply<Sequence, N> + : detail::value_at_key_impl<Sequence, N, typename detail::tag_of<Sequence>::type> {}; } }} diff --git a/boost/fusion/support/category_of.hpp b/boost/fusion/support/category_of.hpp index 6bdf6d0291..92b0ea1b60 100644 --- a/boost/fusion/support/category_of.hpp +++ b/boost/fusion/support/category_of.hpp @@ -36,6 +36,8 @@ namespace boost { namespace fusion struct associative_tag {}; + struct unbounded_tag {}; + namespace extension { template<typename Tag> @@ -107,6 +109,13 @@ namespace boost { namespace fusion random_access_traversal_tag , typename category_of<T>::type> {}; + + template <typename T> + struct is_unbounded + : is_base_of< + unbounded_tag + , typename category_of<T>::type> + {}; } }} diff --git a/boost/fusion/support/config.hpp b/boost/fusion/support/config.hpp index 10dc29df54..23554531b5 100644 --- a/boost/fusion/support/config.hpp +++ b/boost/fusion/support/config.hpp @@ -2,7 +2,7 @@ Copyright (c) 2014 Eric Niebler Copyright (c) 2014 Kohei Takahashi - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_SUPPORT_CONFIG_01092014_1718) @@ -10,6 +10,7 @@ #include <boost/config.hpp> #include <boost/detail/workaround.hpp> +#include <utility> #ifndef BOOST_FUSION_GPU_ENABLED #define BOOST_FUSION_GPU_ENABLED BOOST_GPU_ENABLED @@ -78,7 +79,7 @@ namespace boost { namespace fusion { namespace detail // - MSVC 10.0 implements iterator intrinsics; MSVC 13.0 implements LWG2408. #if (defined(BOOST_LIBSTDCXX_VERSION) && (BOOST_LIBSTDCXX_VERSION < 40500) && \ defined(BOOST_LIBSTDCXX11)) || \ - (defined(BOOST_MSVC) && (1600 <= BOOST_MSVC || BOOST_MSVC < 1900)) + (defined(BOOST_MSVC) && (1600 <= BOOST_MSVC && BOOST_MSVC < 1900)) # define BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { @@ -87,4 +88,12 @@ namespace std } #endif + +// Workaround for older GCC that doesn't accept `this` in constexpr. +#if BOOST_WORKAROUND(BOOST_GCC, < 40700) +#define BOOST_FUSION_CONSTEXPR_THIS +#else +#define BOOST_FUSION_CONSTEXPR_THIS BOOST_CONSTEXPR +#endif + #endif diff --git a/boost/fusion/support/detail/index_sequence.hpp b/boost/fusion/support/detail/index_sequence.hpp new file mode 100644 index 0000000000..1b596e7239 --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <cstddef> + +namespace boost { namespace fusion { namespace detail +{ + template <std::size_t ...Ints> + 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 <typename Left, typename Right> + struct _make_index_sequence_join; + + template <std::size_t... Left, std::size_t... Right> + struct _make_index_sequence_join< + index_sequence<Left...>, index_sequence<Right...> + > : index_sequence<Left..., (sizeof...(Left) + Right)...> + {}; + + template <std::size_t N> + struct make_index_sequence + : _make_index_sequence_join< + typename make_index_sequence<N / 2>::type + , typename make_index_sequence<N - N / 2>::type + > + {}; + + template <> + struct make_index_sequence<1> + : index_sequence<0> + {}; + + template <> + struct make_index_sequence<0> + : index_sequence<> + {}; +}}} + +#endif + diff --git a/boost/fusion/support/pair.hpp b/boost/fusion/support/pair.hpp index fd5d57e687..a4cd1ff092 100644 --- a/boost/fusion/support/pair.hpp +++ b/boost/fusion/support/pair.hpp @@ -49,7 +49,7 @@ namespace boost { namespace fusion #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template <typename Second2> - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_GPU_ENABLED pair(Second2&& val , typename boost::disable_if<is_lvalue_reference<Second2> >::type* /* dummy */ = 0 , typename boost::enable_if<is_convertible<Second2, Second> >::type* /*dummy*/ = 0 diff --git a/boost/fusion/support/unused.hpp b/boost/fusion/support/unused.hpp index 4bbe24e88b..964839ab25 100644 --- a/boost/fusion/support/unused.hpp +++ b/boost/fusion/support/unused.hpp @@ -34,7 +34,7 @@ namespace boost { namespace fusion } template <typename T> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_CONSTEXPR_THIS BOOST_FUSION_GPU_ENABLED unused_type const& operator=(T const&) const BOOST_NOEXCEPT { @@ -49,7 +49,7 @@ namespace boost { namespace fusion return *this; } - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + BOOST_FUSION_CONSTEXPR_THIS BOOST_FUSION_GPU_ENABLED unused_type const& operator=(unused_type const&) const BOOST_NOEXCEPT { @@ -64,7 +64,7 @@ namespace boost { namespace fusion } }; - BOOST_CONSTEXPR unused_type const unused = unused_type(); + BOOST_CONSTEXPR_OR_CONST unused_type unused = unused_type(); namespace detail { diff --git a/boost/fusion/tuple/detail/make_tuple.hpp b/boost/fusion/tuple/detail/make_tuple.hpp new file mode 100644 index 0000000000..f87ea5a231 --- /dev/null +++ b/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 <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/fusion/tuple/detail/tuple.hpp> +#include <boost/fusion/support/detail/as_fusion_element.hpp> + +namespace boost { namespace fusion +{ + BOOST_FUSION_GPU_ENABLED inline tuple<> + make_tuple() + { + return tuple<>(); + } +}} + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/tuple/detail/preprocessed/make_tuple.hpp> +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "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<BOOST_PP_CAT(T, n)>::type + +#define BOOST_PP_FILENAME_1 <boost/fusion/tuple/detail/make_tuple.hpp> +#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_PP_ENUM_PARAMS(N, typename T)> + BOOST_FUSION_GPU_ENABLED + inline tuple<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> + make_tuple(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) + { + return tuple<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/boost/fusion/tuple/detail/preprocessed/tuple10.hpp b/boost/fusion/tuple/detail/preprocessed/tuple10.hpp index 893054caaa..a24a29a12e 100644 --- a/boost/fusion/tuple/detail/preprocessed/tuple10.hpp +++ b/boost/fusion/tuple/detail/preprocessed/tuple10.hpp @@ -17,7 +17,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED tuple() : base_type() {} BOOST_FUSION_GPU_ENABLED tuple(tuple const& rhs) - : base_type(rhs) {} + : base_type(static_cast<base_type const&>(rhs)) {} template <typename U1, typename U2> BOOST_FUSION_GPU_ENABLED tuple(std::pair<U1, U2> const& rhs) @@ -173,7 +173,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED tuple& operator=(tuple const& rhs) { - base_type::operator=(rhs); + base_type::operator=(static_cast<base_type const&>(rhs)); return *this; } template <typename U1, typename U2> diff --git a/boost/fusion/tuple/detail/preprocessed/tuple20.hpp b/boost/fusion/tuple/detail/preprocessed/tuple20.hpp index c526fb7e31..73de49ffb8 100644 --- a/boost/fusion/tuple/detail/preprocessed/tuple20.hpp +++ b/boost/fusion/tuple/detail/preprocessed/tuple20.hpp @@ -17,7 +17,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED tuple() : base_type() {} BOOST_FUSION_GPU_ENABLED tuple(tuple const& rhs) - : base_type(rhs) {} + : base_type(static_cast<base_type const&>(rhs)) {} template <typename U1, typename U2> BOOST_FUSION_GPU_ENABLED tuple(std::pair<U1, U2> const& rhs) @@ -313,7 +313,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED tuple& operator=(tuple const& rhs) { - base_type::operator=(rhs); + base_type::operator=(static_cast<base_type const&>(rhs)); return *this; } template <typename U1, typename U2> diff --git a/boost/fusion/tuple/detail/preprocessed/tuple30.hpp b/boost/fusion/tuple/detail/preprocessed/tuple30.hpp index d99b726d02..9db26a0c9a 100644 --- a/boost/fusion/tuple/detail/preprocessed/tuple30.hpp +++ b/boost/fusion/tuple/detail/preprocessed/tuple30.hpp @@ -17,7 +17,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED tuple() : base_type() {} BOOST_FUSION_GPU_ENABLED tuple(tuple const& rhs) - : base_type(rhs) {} + : base_type(static_cast<base_type const&>(rhs)) {} template <typename U1, typename U2> BOOST_FUSION_GPU_ENABLED tuple(std::pair<U1, U2> const& rhs) @@ -453,7 +453,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED tuple& operator=(tuple const& rhs) { - base_type::operator=(rhs); + base_type::operator=(static_cast<base_type const&>(rhs)); return *this; } template <typename U1, typename U2> diff --git a/boost/fusion/tuple/detail/preprocessed/tuple40.hpp b/boost/fusion/tuple/detail/preprocessed/tuple40.hpp index c8ecbb9690..44e0d2c1d5 100644 --- a/boost/fusion/tuple/detail/preprocessed/tuple40.hpp +++ b/boost/fusion/tuple/detail/preprocessed/tuple40.hpp @@ -17,7 +17,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED tuple() : base_type() {} BOOST_FUSION_GPU_ENABLED tuple(tuple const& rhs) - : base_type(rhs) {} + : base_type(static_cast<base_type const&>(rhs)) {} template <typename U1, typename U2> BOOST_FUSION_GPU_ENABLED tuple(std::pair<U1, U2> const& rhs) @@ -593,7 +593,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED tuple& operator=(tuple const& rhs) { - base_type::operator=(rhs); + base_type::operator=(static_cast<base_type const&>(rhs)); return *this; } template <typename U1, typename U2> diff --git a/boost/fusion/tuple/detail/preprocessed/tuple50.hpp b/boost/fusion/tuple/detail/preprocessed/tuple50.hpp index 94f87e3588..db157b6549 100644 --- a/boost/fusion/tuple/detail/preprocessed/tuple50.hpp +++ b/boost/fusion/tuple/detail/preprocessed/tuple50.hpp @@ -17,7 +17,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED tuple() : base_type() {} BOOST_FUSION_GPU_ENABLED tuple(tuple const& rhs) - : base_type(rhs) {} + : base_type(static_cast<base_type const&>(rhs)) {} template <typename U1, typename U2> BOOST_FUSION_GPU_ENABLED tuple(std::pair<U1, U2> const& rhs) @@ -733,7 +733,7 @@ namespace boost { namespace fusion BOOST_FUSION_GPU_ENABLED tuple& operator=(tuple const& rhs) { - base_type::operator=(rhs); + base_type::operator=(static_cast<base_type const&>(rhs)); return *this; } template <typename U1, typename U2> diff --git a/boost/fusion/tuple/detail/tuple.hpp b/boost/fusion/tuple/detail/tuple.hpp new file mode 100644 index 0000000000..45408f0652 --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/fusion/tuple/detail/tuple_fwd.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/sequence/intrinsic/size.hpp> +#include <boost/fusion/sequence/intrinsic/value_at.hpp> +#include <boost/fusion/sequence/intrinsic/at.hpp> +#include <boost/fusion/sequence/comparison.hpp> +#include <boost/fusion/sequence/io.hpp> +#include <boost/utility/enable_if.hpp> +#include <boost/type_traits/is_const.hpp> +#include <boost/config/no_tr1/utility.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/tuple/detail/preprocessed/tuple.hpp> +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "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 <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)> + struct tuple : vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> + { + 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(static_cast<base_type const&>(rhs)) {} + + template <typename U1, typename U2> + BOOST_FUSION_GPU_ENABLED + tuple(std::pair<U1, U2> const& rhs) + : base_type(rhs) {} + + #include <boost/fusion/tuple/detail/tuple_expand.hpp> + + template <typename T> + 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=(static_cast<base_type const&>(rhs)); + return *this; + } + + template <typename U1, typename U2> + BOOST_FUSION_GPU_ENABLED + tuple& operator=(std::pair<U1, U2> const& rhs) + { + base_type::operator=(rhs); + return *this; + } + }; + + template <typename Tuple> + struct tuple_size : result_of::size<Tuple> {}; + + template <int N, typename Tuple> + struct tuple_element : result_of::value_at_c<Tuple, N> {}; + + template <int N, typename Tuple> + BOOST_FUSION_GPU_ENABLED + inline typename + lazy_disable_if< + is_const<Tuple> + , result_of::at_c<Tuple, N> + >::type + get(Tuple& tup) + { + return at_c<N>(tup); + } + + template <int N, typename Tuple> + BOOST_FUSION_GPU_ENABLED + inline typename result_of::at_c<Tuple const, N>::type + get(Tuple const& tup) + { + return at_c<N>(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/boost/fusion/tuple/detail/tuple_fwd.hpp b/boost/fusion/tuple/detail/tuple_fwd.hpp new file mode 100644 index 0000000000..ef6bdfe8b6 --- /dev/null +++ b/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 <boost/fusion/support/config.hpp> +#include <boost/fusion/container/vector/detail/cpp03/limits.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp> +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "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/boost/fusion/tuple/detail/tuple_tie.hpp b/boost/fusion/tuple/detail/tuple_tie.hpp new file mode 100644 index 0000000000..b650d1cc16 --- /dev/null +++ b/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 <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/fusion/tuple/detail/tuple.hpp> + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include <boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp> +#else +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(preserve: 2, line: 0, output: "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 <boost/fusion/tuple/detail/tuple_tie.hpp> +#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_PP_ENUM_PARAMS(N, typename T)> + BOOST_FUSION_GPU_ENABLED + inline tuple<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> + tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) + { + return tuple<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>( + BOOST_PP_ENUM_PARAMS(N, arg)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/boost/fusion/tuple/make_tuple.hpp b/boost/fusion/tuple/make_tuple.hpp index 93034834d9..0d1277366a 100644 --- a/boost/fusion/tuple/make_tuple.hpp +++ b/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 <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/fusion/tuple/tuple.hpp> -#include <boost/fusion/support/detail/as_fusion_element.hpp> +#include <boost/fusion/support/config.hpp> +#include <boost/fusion/tuple/tuple_fwd.hpp> -namespace boost { namespace fusion -{ - BOOST_FUSION_GPU_ENABLED inline tuple<> - make_tuple() - { - return tuple<>(); - } -}} - -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/tuple/detail/preprocessed/make_tuple.hpp> -#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<BOOST_PP_CAT(T, n)>::type - -#define BOOST_PP_FILENAME_1 <boost/fusion/tuple/make_tuple.hpp> -#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 <boost/fusion/tuple/detail/make_tuple.hpp> -#define N BOOST_PP_ITERATION() - - template <BOOST_PP_ENUM_PARAMS(N, typename T)> - BOOST_FUSION_GPU_ENABLED - inline tuple<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> - make_tuple(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg)) - { - return tuple<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>( - BOOST_PP_ENUM_PARAMS(N, arg)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) +#endif diff --git a/boost/fusion/tuple/tuple.hpp b/boost/fusion/tuple/tuple.hpp index 953f2b6664..674c369132 100644 --- a/boost/fusion/tuple/tuple.hpp +++ b/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 <boost/fusion/support/config.hpp> #include <boost/fusion/tuple/tuple_fwd.hpp> -#include <boost/fusion/container/vector/vector.hpp> -#include <boost/fusion/sequence/intrinsic/size.hpp> -#include <boost/fusion/sequence/intrinsic/value_at.hpp> -#include <boost/fusion/sequence/intrinsic/at.hpp> -#include <boost/fusion/sequence/comparison.hpp> -#include <boost/fusion/sequence/io.hpp> -#include <boost/utility/enable_if.hpp> -#include <boost/type_traits/is_const.hpp> -#include <boost/config/no_tr1/utility.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/tuple/detail/preprocessed/tuple.hpp> -#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 <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)> - struct tuple : vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> - { - 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 <typename U1, typename U2> - BOOST_FUSION_GPU_ENABLED - tuple(std::pair<U1, U2> const& rhs) - : base_type(rhs) {} - - #include <boost/fusion/tuple/detail/tuple_expand.hpp> - - template <typename T> - 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 <typename U1, typename U2> - BOOST_FUSION_GPU_ENABLED - tuple& operator=(std::pair<U1, U2> const& rhs) - { - base_type::operator=(rhs); - return *this; - } - }; - - template <typename Tuple> - struct tuple_size : result_of::size<Tuple> {}; - - template <int N, typename Tuple> - struct tuple_element : result_of::value_at_c<Tuple, N> {}; - - template <int N, typename Tuple> - BOOST_FUSION_GPU_ENABLED - inline typename - lazy_disable_if< - is_const<Tuple> - , result_of::at_c<Tuple, N> - >::type - get(Tuple& tup) - { - return at_c<N>(tup); - } - - template <int N, typename Tuple> - BOOST_FUSION_GPU_ENABLED - inline typename result_of::at_c<Tuple const, N>::type - get(Tuple const& tup) - { - return at_c<N>(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 <boost/fusion/tuple/detail/tuple.hpp> #endif diff --git a/boost/fusion/tuple/tuple_fwd.hpp b/boost/fusion/tuple/tuple_fwd.hpp index 68969183d1..0742023403 100644 --- a/boost/fusion/tuple/tuple_fwd.hpp +++ b/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 <boost/config.hpp> #include <boost/fusion/support/config.hpp> -#include <boost/fusion/container/vector/limits.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp> -#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 <boost/fusion/tuple/detail/tuple_fwd.hpp> #endif diff --git a/boost/fusion/tuple/tuple_tie.hpp b/boost/fusion/tuple/tuple_tie.hpp index 1905028766..9202807048 100644 --- a/boost/fusion/tuple/tuple_tie.hpp +++ b/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 <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/cat.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/fusion/tuple/tuple.hpp> +#include <boost/fusion/support/config.hpp> +#include <boost/fusion/tuple/tuple_fwd.hpp> -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include <boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp> -#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 <boost/fusion/tuple/tuple_tie.hpp> -#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 <boost/fusion/tuple/detail/tuple_tie.hpp> -#define N BOOST_PP_ITERATION() - - template <BOOST_PP_ENUM_PARAMS(N, typename T)> - BOOST_FUSION_GPU_ENABLED - inline tuple<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> - tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg)) - { - return tuple<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>( - BOOST_PP_ENUM_PARAMS(N, arg)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) +#endif diff --git a/boost/fusion/view/nview/detail/cpp03/nview_impl.hpp b/boost/fusion/view/nview/detail/cpp03/nview_impl.hpp new file mode 100644 index 0000000000..08c6c9d738 --- /dev/null +++ b/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 <climits> +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/repeat.hpp> +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> + +#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 <typename Sequence + , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, INT_MAX)> + struct as_nview + { + typedef mpl::vector_c< + int, BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, I) + > index_type; + typedef nview<Sequence, index_type> 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 <typename Sequence, BOOST_PP_ENUM_PARAMS(N, int I)> + struct as_nview<Sequence, BOOST_PP_ENUM_PARAMS(N, I)> + { + typedef mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> index_type; + typedef nview<Sequence, index_type> type; + }; +}}} +#endif + +namespace boost { namespace fusion +{ + template<BOOST_PP_ENUM_PARAMS(N, int I), typename Sequence> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline nview<Sequence, mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> > + as_nview(Sequence& s) + { + typedef mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> index_type; + return nview<Sequence, index_type>(s); + } + +}} + +#undef N + +#endif diff --git a/boost/fusion/view/nview/detail/nview_impl.hpp b/boost/fusion/view/nview/detail/nview_impl.hpp index e0d9335638..40674e3551 100644 --- a/boost/fusion/view/nview/detail/nview_impl.hpp +++ b/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 <climits> -#include <boost/preprocessor/cat.hpp> -#include <boost/preprocessor/repeat.hpp> -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, FUSION_MAX_VECTOR_SIZE, \ - "boost/fusion/view/nview/detail/nview_impl.hpp")) \ - /**/ +#include <boost/fusion/support/config.hpp> /////////////////////////////////////////////////////////////////////////////// -namespace boost { namespace fusion { namespace result_of -{ - template <typename Sequence - , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, INT_MAX)> - struct as_nview - { - typedef mpl::vector_c< - int, BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, I) - > index_type; - typedef nview<Sequence, index_type> type; - }; -}}} - -#include BOOST_PP_ITERATE() - -#endif - +// Without variadics, we will use the PP version /////////////////////////////////////////////////////////////////////////////// -// Preprocessor vertical repetition code -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() +# include <boost/fusion/view/nview/detail/cpp03/nview_impl.hpp> -#if N < FUSION_MAX_VECTOR_SIZE -namespace boost { namespace fusion { namespace result_of -{ - template <typename Sequence, BOOST_PP_ENUM_PARAMS(N, int I)> - struct as_nview<Sequence, BOOST_PP_ENUM_PARAMS(N, I)> - { - typedef mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> index_type; - typedef nview<Sequence, index_type> type; - }; -}}} #endif -namespace boost { namespace fusion -{ - template<BOOST_PP_ENUM_PARAMS(N, int I), typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline nview<Sequence, mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> > - as_nview(Sequence& s) - { - typedef mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> index_type; - return nview<Sequence, index_type>(s); - } - -}} - -#undef N - -#endif |