1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2005 Eric Niebler
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
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>
15 namespace boost { namespace fusion
21 template <typename Car, typename Cdr = nil_>
24 typedef cons<typename detail::as_fusion_element<Car>::type, Cdr> type;
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)
33 return cons<typename detail::as_fusion_element<Car>::type>(car);
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)
41 return cons<typename detail::as_fusion_element<Car>::type, Cdr>(car, cdr);