forked from boostorg/fusion
baking segmented Fusion
[SVN r73854]
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#if !defined(FUSION_CONS_07172005_0843)
|
||||
#define FUSION_CONS_07172005_0843
|
||||
|
||||
#include <boost/fusion/container/list/cons_fwd.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
@ -55,7 +56,7 @@ namespace boost { namespace fusion
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Car, typename Cdr = nil>
|
||||
template <typename Car, typename Cdr /*= nil*/>
|
||||
struct cons : sequence_base<cons<Car, Cdr> >
|
||||
{
|
||||
typedef mpl::int_<Cdr::size::value+1> size;
|
||||
|
20
include/boost/fusion/container/list/cons_fwd.hpp
Normal file
20
include/boost/fusion/container/list/cons_fwd.hpp
Normal file
@ -0,0 +1,20 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
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(BOOST_FUSION_CONS_FWD_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_CONS_FWD_HPP_INCLUDED
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nil;
|
||||
|
||||
template <typename Car, typename Cdr = nil>
|
||||
struct cons;
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -7,8 +7,7 @@
|
||||
#if !defined(BOOST_FUSION_REVERSE_CONS_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_REVERSE_CONS_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/container/list/cons.hpp>
|
||||
#include <boost/fusion/container/generation/make_cons.hpp>
|
||||
#include <boost/fusion/container/list/cons_fwd.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
@ -24,7 +23,8 @@ namespace boost { namespace fusion { namespace detail
|
||||
|
||||
static type call(cons<Car, Cdr> const &cons, State const &state = State())
|
||||
{
|
||||
return impl::call(cons.cdr, fusion::make_cons(cons.car, state));
|
||||
typedef fusion::cons<Car, State> cdr_type;
|
||||
return impl::call(cons.cdr, cdr_type(cons.car, state));
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user