]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fusion/include/boost/fusion/container/generation/make_cons.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / fusion / include / boost / fusion / container / generation / make_cons.hpp
1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2005 Eric Niebler
4
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(FUSION_MAKE_CONS_07172005_0918)
9 #define FUSION_MAKE_CONS_07172005_0918
10
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/support/detail/as_fusion_element.hpp>
13 #include <boost/fusion/container/list/cons.hpp>
14
15 namespace boost { namespace fusion
16 {
17 struct nil_;
18
19 namespace result_of
20 {
21 template <typename Car, typename Cdr = nil_>
22 struct make_cons
23 {
24 typedef cons<typename detail::as_fusion_element<Car>::type, Cdr> type;
25 };
26 }
27
28 template <typename Car>
29 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
30 inline cons<typename detail::as_fusion_element<Car>::type>
31 make_cons(Car const& car)
32 {
33 return cons<typename detail::as_fusion_element<Car>::type>(car);
34 }
35
36 template <typename Car, typename Cdr>
37 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
38 inline cons<typename detail::as_fusion_element<Car>::type, Cdr>
39 make_cons(Car const& car, Cdr const& cdr)
40 {
41 return cons<typename detail::as_fusion_element<Car>::type, Cdr>(car, cdr);
42 }
43 }}
44
45 #endif
46