1 /*=============================================================================
2 Copyright (c) 2001-2006 Joel de Guzman
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 #if !defined(FUSION_BUILD_CONS_09232005_1222)
8 #define FUSION_BUILD_CONS_09232005_1222
10 #include <boost/fusion/container/list/cons.hpp>
11 #include <boost/fusion/iterator/equal_to.hpp>
12 #include <boost/fusion/iterator/next.hpp>
13 #include <boost/fusion/iterator/value_of.hpp>
14 #include <boost/fusion/iterator/deref.hpp>
16 namespace boost
{ namespace fusion
{ namespace detail
21 , bool is_empty
= result_of::equal_to
<First
, Last
>::value
>
24 template <typename First
, typename Last
>
25 struct build_cons
<First
, Last
, true>
30 call(First
const&, Last
const&)
36 template <typename First
, typename Last
>
37 struct build_cons
<First
, Last
, false>
40 build_cons
<typename
result_of::next
<First
>::type
, Last
>
44 typename
result_of::value_of
<First
>::type
45 , typename
next_build_cons::type
>
49 call(First
const& f
, Last
const& l
)
51 return type(*f
, next_build_cons::call(fusion::next(f
), l
));