]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fusion/include/boost/fusion/container/list/detail/list_to_cons.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / fusion / include / boost / fusion / container / list / detail / list_to_cons.hpp
1 /*=============================================================================
2 Copyright (c) 2014-2015 Kohei Takahashi
3
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
9
10 #include <boost/config.hpp>
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/container/list/list_fwd.hpp>
13
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>
19 #else
20
21 ///////////////////////////////////////////////////////////////////////////////
22 // C++11 interface
23 ///////////////////////////////////////////////////////////////////////////////
24 #include <boost/fusion/container/list/cons.hpp>
25 #include <boost/fusion/support/detail/access.hpp>
26
27 namespace boost { namespace fusion { namespace detail
28 {
29 template <typename ...T>
30 struct list_to_cons;
31
32 template <>
33 struct list_to_cons<>
34 {
35 typedef nil_ type;
36
37 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
38 static type call() { return type(); }
39 };
40
41 template <typename Head, typename ...Tail>
42 struct list_to_cons<Head, Tail...>
43 {
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;
47
48 typedef cons<head_type, tail_type> type;
49
50 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
51 static type
52 call(typename detail::call_param<Head>::type _h,
53 typename detail::call_param<Tail>::type ..._t)
54 {
55 return type(_h, tail_list_to_cons::call(_t...));
56 }
57 };
58 }}}
59
60 #endif
61 #endif