baking segmented Fusion

[SVN r73854]
This commit is contained in:
Eric Niebler
2011-08-17 18:53:56 +00:00
parent 2baebc560a
commit 528ad04fdb
86 changed files with 1403 additions and 1041 deletions

View File

@ -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;

View 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

View File

@ -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));
}
};