1 /*=============================================================================
2 Copyright (c) 2005 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #if !defined(FUSION_LIST_07172005_1153)
8 #define FUSION_LIST_07172005_1153
10 #include <boost/fusion/container/list/list_fwd.hpp>
11 #include <boost/fusion/container/list/detail/list_to_cons.hpp>
13 namespace boost
{ namespace fusion
18 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE
, typename T
)>
20 : detail::list_to_cons
<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE
, T
)>::type
24 detail::list_to_cons
<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE
, T
)>
28 typedef typename
list_to_cons::type inherited_type
;
33 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE
, typename U
)>
34 list(list
<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE
, U
)> const& rhs
)
35 : inherited_type(rhs
) {}
37 template <typename Sequence
>
38 list(Sequence
const& rhs
)
39 : inherited_type(rhs
) {}
41 // Expand a couple of forwarding constructors for arguments
42 // of type (T0), (T0, T1), (T0, T1, T2) etc. Exanple:
45 // typename detail::call_param<T0>::type _0
46 // , typename detail::call_param<T1>::type _1)
47 // : inherited_type(list_to_cons::call(_0, _1)) {}
48 #include <boost/fusion/container/list/detail/list_forward_ctor.hpp>
50 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE
, typename U
)>
52 operator=(list
<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE
, U
)> const& rhs
)
54 inherited_type::operator=(rhs
);
60 operator=(T
const& rhs
)
62 inherited_type::operator=(rhs
);