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_MAIN_10262014_0447
8 #define FUSION_LIST_MAIN_10262014_0447
10 #include <boost/config.hpp>
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/container/list/list_fwd.hpp>
14 ///////////////////////////////////////////////////////////////////////////////
15 // Without variadics, we will use the PP version
16 ///////////////////////////////////////////////////////////////////////////////
17 #if !defined(BOOST_FUSION_HAS_VARIADIC_LIST)
18 # include <boost/fusion/container/list/detail/cpp03/list_to_cons.hpp>
21 ///////////////////////////////////////////////////////////////////////////////
23 ///////////////////////////////////////////////////////////////////////////////
24 #include <boost/fusion/container/list/cons.hpp>
25 #include <boost/fusion/support/detail/access.hpp>
27 namespace boost { namespace fusion { namespace detail
29 template <typename ...T>
37 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
38 static type call() { return type(); }
41 template <typename Head, typename ...Tail>
42 struct list_to_cons<Head, Tail...>
44 typedef Head head_type;
45 typedef list_to_cons<Tail...> tail_list_to_cons;
46 typedef typename tail_list_to_cons::type tail_type;
48 typedef cons<head_type, tail_type> type;
50 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
52 call(typename detail::call_param<Head>::type _h,
53 typename detail::call_param<Tail>::type ..._t)
55 return type(_h, tail_list_to_cons::call(_t...));