Added boost header
This commit is contained in:
47
test/external/boost/fusion/view/reverse_view/detail/advance_impl.hpp
vendored
Normal file
47
test/external/boost/fusion/view/reverse_view/detail/advance_impl.hpp
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
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_ADVANCE_IMPL_14122005_2015)
|
||||
#define FUSION_ADVANCE_IMPL_14122005_2015
|
||||
|
||||
#include <boost/fusion/iterator/advance.hpp>
|
||||
#include <boost/mpl/negate.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct reverse_view_iterator_tag;
|
||||
|
||||
template <typename Iterator>
|
||||
struct reverse_view_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct advance_impl;
|
||||
|
||||
template<>
|
||||
struct advance_impl<reverse_view_iterator_tag>
|
||||
{
|
||||
template<typename Iterator, typename Dist>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::first_type first_type;
|
||||
typedef typename mpl::negate<Dist>::type negative_dist;
|
||||
typedef typename result_of::advance<first_type, negative_dist>::type advanced_type;
|
||||
typedef reverse_view_iterator<advanced_type> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(boost::fusion::advance<negative_dist>(i.first));
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
41
test/external/boost/fusion/view/reverse_view/detail/at_impl.hpp
vendored
Normal file
41
test/external/boost/fusion/view/reverse_view/detail/at_impl.hpp
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Christopher Schmidt
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP
|
||||
#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
||||
#include <boost/mpl/minus.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace extension
|
||||
{
|
||||
template <typename>
|
||||
struct at_impl;
|
||||
|
||||
template <>
|
||||
struct at_impl<reverse_view_tag>
|
||||
{
|
||||
template <typename Seq, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef mpl::minus<typename Seq::size, mpl::int_<1>, N> real_n;
|
||||
|
||||
typedef typename
|
||||
result_of::at<typename Seq::seq_type, real_n>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Seq& seq)
|
||||
{
|
||||
return fusion::at<real_n>(seq.seq);
|
||||
}
|
||||
};
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
42
test/external/boost/fusion/view/reverse_view/detail/begin_impl.hpp
vendored
Normal file
42
test/external/boost/fusion/view/reverse_view/detail/begin_impl.hpp
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
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_BEGIN_IMPL_07202005_0849)
|
||||
#define FUSION_BEGIN_IMPL_07202005_0849
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct reverse_view_tag;
|
||||
|
||||
template <typename Iterator>
|
||||
struct reverse_view_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct begin_impl;
|
||||
|
||||
template <>
|
||||
struct begin_impl<reverse_view_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef reverse_view_iterator<typename Sequence::last_type> type;
|
||||
|
||||
static type
|
||||
call(Sequence const& s)
|
||||
{
|
||||
return type(s.last());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
37
test/external/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp
vendored
Normal file
37
test/external/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Christopher Schmidt
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
|
||||
#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
|
||||
|
||||
#include <boost/fusion/iterator/deref_data.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace extension
|
||||
{
|
||||
template <typename>
|
||||
struct deref_data_impl;
|
||||
|
||||
template <>
|
||||
struct deref_data_impl<reverse_view_iterator_tag>
|
||||
{
|
||||
template <typename It>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
result_of::deref_data<typename It::first_type>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(It const& it)
|
||||
{
|
||||
return fusion::deref_data(it.first);
|
||||
}
|
||||
};
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
48
test/external/boost/fusion/view/reverse_view/detail/deref_impl.hpp
vendored
Normal file
48
test/external/boost/fusion/view/reverse_view/detail/deref_impl.hpp
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
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_DEREF_IMPL_07202005_0851)
|
||||
#define FUSION_DEREF_IMPL_07202005_0851
|
||||
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct reverse_view_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct deref_impl;
|
||||
|
||||
template <>
|
||||
struct deref_impl<reverse_view_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
result_of::deref<
|
||||
typename result_of::prior<
|
||||
typename Iterator::first_type
|
||||
>::type
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return *fusion::prior(i.first);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
45
test/external/boost/fusion/view/reverse_view/detail/distance_impl.hpp
vendored
Normal file
45
test/external/boost/fusion/view/reverse_view/detail/distance_impl.hpp
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
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_DISTANCE_IMPL_14122005_2104)
|
||||
#define FUSION_DISTANCE_IMPL_14122005_2104
|
||||
|
||||
#include <boost/fusion/iterator/distance.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct reverse_view_iterator_tag;
|
||||
|
||||
template <typename Iterator>
|
||||
struct reverse_view_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct distance_impl;
|
||||
|
||||
template<>
|
||||
struct distance_impl<reverse_view_iterator_tag>
|
||||
{
|
||||
template<typename First, typename Last>
|
||||
struct apply
|
||||
{
|
||||
typedef typename First::first_type first_type;
|
||||
typedef typename Last::first_type last_type;
|
||||
typedef typename result_of::distance<last_type, first_type>::type type;
|
||||
|
||||
static type
|
||||
call(First const& first, Last const& last)
|
||||
{
|
||||
return boost::fusion::distance(last.first, first.first);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
42
test/external/boost/fusion/view/reverse_view/detail/end_impl.hpp
vendored
Normal file
42
test/external/boost/fusion/view/reverse_view/detail/end_impl.hpp
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
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_07202005_0851)
|
||||
#define FUSION_END_IMPL_07202005_0851
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct reverse_view_tag;
|
||||
|
||||
template <typename Iterator>
|
||||
struct reverse_view_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct end_impl;
|
||||
|
||||
template <>
|
||||
struct end_impl<reverse_view_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef reverse_view_iterator<typename Sequence::first_type> type;
|
||||
|
||||
static type
|
||||
call(Sequence const& s)
|
||||
{
|
||||
return type(s.first());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
28
test/external/boost/fusion/view/reverse_view/detail/key_of_impl.hpp
vendored
Normal file
28
test/external/boost/fusion/view/reverse_view/detail/key_of_impl.hpp
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Christopher Schmidt
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_KEY_OF_IMPL_HPP
|
||||
#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_KEY_OF_IMPL_HPP
|
||||
|
||||
#include <boost/fusion/iterator/key_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace extension
|
||||
{
|
||||
template <typename>
|
||||
struct key_of_impl;
|
||||
|
||||
template <>
|
||||
struct key_of_impl<reverse_view_iterator_tag>
|
||||
{
|
||||
template <typename It>
|
||||
struct apply
|
||||
: result_of::key_of<typename It::it_type>
|
||||
{};
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
47
test/external/boost/fusion/view/reverse_view/detail/next_impl.hpp
vendored
Normal file
47
test/external/boost/fusion/view/reverse_view/detail/next_impl.hpp
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
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_NEXT_IMPL_07202005_0856)
|
||||
#define FUSION_NEXT_IMPL_07202005_0856
|
||||
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct reverse_view_iterator_tag;
|
||||
|
||||
template <typename Iterator>
|
||||
struct reverse_view_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <>
|
||||
struct next_impl<reverse_view_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::first_type first_type;
|
||||
typedef typename prior_impl<typename first_type::fusion_tag>::
|
||||
template apply<first_type>
|
||||
wrapped;
|
||||
|
||||
typedef reverse_view_iterator<typename wrapped::type> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(wrapped::call(i.first));
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
47
test/external/boost/fusion/view/reverse_view/detail/prior_impl.hpp
vendored
Normal file
47
test/external/boost/fusion/view/reverse_view/detail/prior_impl.hpp
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
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_PRIOR_IMPL_07202005_0857)
|
||||
#define FUSION_PRIOR_IMPL_07202005_0857
|
||||
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct reverse_view_iterator_tag;
|
||||
|
||||
template <typename Iterator>
|
||||
struct reverse_view_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <>
|
||||
struct prior_impl<reverse_view_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::first_type first_type;
|
||||
typedef typename next_impl<typename first_type::fusion_tag>::
|
||||
template apply<first_type>
|
||||
wrapped;
|
||||
|
||||
typedef reverse_view_iterator<typename wrapped::type> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(wrapped::call(i.first));
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
33
test/external/boost/fusion/view/reverse_view/detail/value_at_impl.hpp
vendored
Normal file
33
test/external/boost/fusion/view/reverse_view/detail/value_at_impl.hpp
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Christopher Schmidt
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_AT_IMPL_HPP
|
||||
#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_AT_IMPL_HPP
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
|
||||
#include <boost/mpl/minus.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace extension
|
||||
{
|
||||
template <typename>
|
||||
struct value_at_impl;
|
||||
|
||||
template <>
|
||||
struct value_at_impl<reverse_view_tag>
|
||||
{
|
||||
template <typename Seq, typename N>
|
||||
struct apply
|
||||
: result_of::value_at<
|
||||
typename Seq::seq_type
|
||||
, mpl::minus<typename Seq::size, mpl::int_<1>, N>
|
||||
>
|
||||
{};
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
28
test/external/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp
vendored
Normal file
28
test/external/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Christopher Schmidt
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
|
||||
#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
|
||||
|
||||
#include <boost/fusion/iterator/value_of_data.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace extension
|
||||
{
|
||||
template <typename>
|
||||
struct value_of_data_impl;
|
||||
|
||||
template <>
|
||||
struct value_of_data_impl<reverse_view_iterator_tag>
|
||||
{
|
||||
template <typename It>
|
||||
struct apply
|
||||
: result_of::value_of_data<typename It::first_type>
|
||||
{};
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
42
test/external/boost/fusion/view/reverse_view/detail/value_of_impl.hpp
vendored
Normal file
42
test/external/boost/fusion/view/reverse_view/detail/value_of_impl.hpp
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
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_VALUE_OF_IMPL_07202005_0900)
|
||||
#define FUSION_VALUE_OF_IMPL_07202005_0900
|
||||
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct reverse_view_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_of_impl;
|
||||
|
||||
template <>
|
||||
struct value_of_impl<reverse_view_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
result_of::value_of<
|
||||
typename result_of::prior<
|
||||
typename Iterator::first_type
|
||||
>::type
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
68
test/external/boost/fusion/view/reverse_view/reverse_view.hpp
vendored
Normal file
68
test/external/boost/fusion/view/reverse_view/reverse_view.hpp
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
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_REVERSE_VIEW_07202005_0836)
|
||||
#define FUSION_REVERSE_VIEW_07202005_0836
|
||||
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/support/is_view.hpp>
|
||||
#include <boost/fusion/support/category_of.hpp>
|
||||
#include <boost/fusion/view/reverse_view/reverse_view_iterator.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/end_impl.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/at_impl.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/inherit.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct reverse_view_tag;
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
template <typename Sequence>
|
||||
struct reverse_view : sequence_base<reverse_view<Sequence> >
|
||||
{
|
||||
typedef reverse_view_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
||||
typedef mpl::true_ is_view;
|
||||
|
||||
typedef Sequence seq_type;
|
||||
typedef typename traits::category_of<Sequence>::type category;
|
||||
typedef typename result_of::begin<Sequence>::type first_type;
|
||||
typedef typename result_of::end<Sequence>::type last_type;
|
||||
typedef typename result_of::size<Sequence>::type size;
|
||||
|
||||
BOOST_STATIC_ASSERT((
|
||||
is_base_of<
|
||||
bidirectional_traversal_tag
|
||||
, typename traits::category_of<first_type>::type>::value));
|
||||
|
||||
reverse_view(Sequence& in_seq)
|
||||
: seq(in_seq)
|
||||
{}
|
||||
|
||||
first_type first() const { return fusion::begin(seq); }
|
||||
last_type last() const { return fusion::end(seq); }
|
||||
typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
reverse_view& operator= (reverse_view const&);
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
56
test/external/boost/fusion/view/reverse_view/reverse_view_iterator.hpp
vendored
Normal file
56
test/external/boost/fusion/view/reverse_view/reverse_view_iterator.hpp
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
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_REVERSE_VIEW_ITERATOR_07202005_0835)
|
||||
#define FUSION_REVERSE_VIEW_ITERATOR_07202005_0835
|
||||
|
||||
#include <boost/fusion/support/iterator_base.hpp>
|
||||
#include <boost/fusion/support/category_of.hpp>
|
||||
#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
|
||||
#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/deref_impl.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/next_impl.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/prior_impl.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/advance_impl.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/distance_impl.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/value_of_impl.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/deref_data_impl.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp>
|
||||
#include <boost/fusion/view/reverse_view/detail/key_of_impl.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct reverse_view_iterator_tag;
|
||||
|
||||
template <typename First>
|
||||
struct reverse_view_iterator
|
||||
: iterator_base<reverse_view_iterator<First> >
|
||||
{
|
||||
typedef convert_iterator<First> converter;
|
||||
typedef typename converter::type first_type;
|
||||
typedef reverse_view_iterator_tag fusion_tag;
|
||||
typedef typename traits::category_of<first_type>::type category;
|
||||
|
||||
BOOST_STATIC_ASSERT((
|
||||
is_base_of<
|
||||
bidirectional_traversal_tag
|
||||
, category>::value));
|
||||
|
||||
reverse_view_iterator(First const& in_first)
|
||||
: first(converter::call(in_first)) {}
|
||||
|
||||
first_type first;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
reverse_view_iterator& operator= (reverse_view_iterator const&);
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user