1 /*=============================================================================
2 Copyright (c) 2014-2015 Kohei Takahashi
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #ifndef FUSION_LIST_10262014_0537
8 #define FUSION_LIST_10262014_0537
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/container/list/list_fwd.hpp>
13 ///////////////////////////////////////////////////////////////////////////////
14 // Without variadics, we will use the PP version
15 ///////////////////////////////////////////////////////////////////////////////
16 #if !defined(BOOST_FUSION_HAS_VARIADIC_LIST)
17 # include <boost/fusion/container/list/detail/cpp03/list.hpp>
20 ///////////////////////////////////////////////////////////////////////////////
22 ///////////////////////////////////////////////////////////////////////////////
24 #include <boost/fusion/container/list/detail/list_to_cons.hpp>
26 namespace boost { namespace fusion
32 : detail::list_to_cons<>::type
35 typedef detail::list_to_cons<> list_to_cons;
36 typedef list_to_cons::type inherited_type;
39 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
43 #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
44 template <typename Sequence>
45 BOOST_FUSION_GPU_ENABLED
46 list(Sequence const& rhs)
47 : inherited_type(rhs) {}
49 template <typename Sequence>
50 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
52 operator=(Sequence const& rhs)
54 inherited_type::operator=(rhs);
58 template <typename Sequence>
59 BOOST_FUSION_GPU_ENABLED
61 : inherited_type(std::forward<Sequence>(rhs)) {}
63 template <typename Sequence>
64 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
66 operator=(Sequence&& rhs)
68 inherited_type::operator=(std::forward<Sequence>(rhs));
74 template <typename ...T>
76 : detail::list_to_cons<T...>::type
79 typedef detail::list_to_cons<T...> list_to_cons;
80 typedef typename list_to_cons::type inherited_type;
83 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
87 #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
88 template <typename Sequence>
89 BOOST_FUSION_GPU_ENABLED
90 list(Sequence const& rhs)
91 : inherited_type(rhs) {}
93 template <typename Sequence>
94 BOOST_FUSION_GPU_ENABLED
96 : inherited_type(std::forward<Sequence>(rhs)) {}
99 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
101 list(typename detail::call_param<T>::type ...args)
102 : inherited_type(list_to_cons::call(args...)) {}
104 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
105 template <typename Sequence>
106 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
108 operator=(Sequence const& rhs)
110 inherited_type::operator=(rhs);
114 template <typename Sequence>
115 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
117 operator=(Sequence&& rhs)
119 inherited_type::operator=(std::forward<Sequence>(rhs));