fusion: merge of associative iterators/views and the new fold interface

[SVN r58618]
This commit is contained in:
Christopher Schmidt
2010-01-01 22:00:21 +00:00
parent b605617c4f
commit cda74605fc
379 changed files with 28481 additions and 2185 deletions

View File

@ -1,53 +1,43 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2009 Christopher Schmidt
Distributed under the Boost Software License, Version 1.0. (See accompanying
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_END_IMPL_09162005_1121)
#define FUSION_END_IMPL_09162005_1121
#include <boost/fusion/sequence/intrinsic/end.hpp>
#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_END_IMPL_HPP
#define BOOST_FUSION_CONTAINER_SET_DETAIL_END_IMPL_HPP
namespace boost { namespace fusion
#include <boost/fusion/iterator/basic_iterator.hpp>
namespace boost { namespace fusion { namespace extension
{
struct set_tag;
template <typename>
struct end_impl;
namespace extension
template <>
struct end_impl<set_tag>
{
template <typename Tag>
struct end_impl;
template <>
struct end_impl<set_tag>
template <typename Seq>
struct apply
{
template <typename Sequence>
struct apply
typedef
basic_iterator<
set_iterator_tag
, typename Seq::category
, Seq
, Seq::size::value
>
type;
static type
call(Seq& seq)
{
typedef typename
result_of::end<typename Sequence::storage_type>::type
iterator_type;
typedef typename
result_of::end<typename Sequence::storage_type const>::type
const_iterator_type;
typedef typename
mpl::eval_if<
is_const<Sequence>
, mpl::identity<const_iterator_type>
, mpl::identity<iterator_type>
>::type
type;
static type
call(Sequence& s)
{
return fusion::end(s.get_data());
}
};
return type(seq,0);
}
};
}
}}
};
}}}
#endif