Files

47 lines
1.4 KiB
C++
Raw Permalink Normal View History

2007-10-21 00:52:09 +00:00
/*=============================================================================
2011-09-16 05:56:36 +00:00
Copyright (c) 2001-2011 Joel de Guzman
2007-10-21 00:52:09 +00:00
Copyright (c) 2005 Eric Niebler
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_MAKE_CONS_07172005_0918)
#define FUSION_MAKE_CONS_07172005_0918
2014-01-09 17:58:06 -08:00
#include <boost/fusion/support/config.hpp>
2007-10-21 00:52:09 +00:00
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/container/list/cons.hpp>
namespace boost { namespace fusion
{
struct nil_;
2007-10-21 00:52:09 +00:00
namespace result_of
{
template <typename Car, typename Cdr = nil_>
2007-10-21 00:52:09 +00:00
struct make_cons
{
typedef cons<typename detail::as_fusion_element<Car>::type, Cdr> type;
};
}
template <typename Car>
2015-03-03 02:21:02 +09:00
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
2007-10-21 00:52:09 +00:00
inline cons<typename detail::as_fusion_element<Car>::type>
make_cons(Car const& car)
{
return cons<typename detail::as_fusion_element<Car>::type>(car);
}
template <typename Car, typename Cdr>
2015-03-03 02:21:02 +09:00
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
2007-10-21 00:52:09 +00:00
inline cons<typename detail::as_fusion_element<Car>::type, Cdr>
make_cons(Car const& car, Cdr const& cdr)
{
return cons<typename detail::as_fusion_element<Car>::type, Cdr>(car, cdr);
}
}}
#endif