Added boost header
This commit is contained in:
67
test/external/boost/fusion/view/joint_view/detail/begin_impl.hpp
vendored
Normal file
67
test/external/boost/fusion/view/joint_view/detail/begin_impl.hpp
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
/*=============================================================================
|
||||
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_07162005_0115)
|
||||
#define FUSION_BEGIN_IMPL_07162005_0115
|
||||
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct joint_view_tag;
|
||||
|
||||
template <typename Category, typename First, typename Last, typename Concat>
|
||||
struct joint_view_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct begin_impl;
|
||||
|
||||
template <>
|
||||
struct begin_impl<joint_view_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Sequence::first_type first_type;
|
||||
typedef typename Sequence::last_type last_type;
|
||||
typedef typename Sequence::concat_type concat_type;
|
||||
typedef typename Sequence::category category;
|
||||
typedef result_of::equal_to<first_type, last_type> equal_to;
|
||||
|
||||
typedef typename
|
||||
mpl::if_<
|
||||
equal_to
|
||||
, concat_type
|
||||
, joint_view_iterator<category, first_type, last_type, concat_type>
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Sequence& s, mpl::true_)
|
||||
{
|
||||
return s.concat();
|
||||
}
|
||||
|
||||
static type
|
||||
call(Sequence& s, mpl::false_)
|
||||
{
|
||||
return type(s.first(), s.concat());
|
||||
}
|
||||
|
||||
static type
|
||||
call(Sequence& s)
|
||||
{
|
||||
return call(s, equal_to());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
37
test/external/boost/fusion/view/joint_view/detail/deref_data_impl.hpp
vendored
Normal file
37
test/external/boost/fusion/view/joint_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_JOINT_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
|
||||
#define BOOST_FUSION_VIEW_JOINT_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<joint_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
|
||||
29
test/external/boost/fusion/view/joint_view/detail/deref_impl.hpp
vendored
Normal file
29
test/external/boost/fusion/view/joint_view/detail/deref_impl.hpp
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*=============================================================================
|
||||
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_07162005_0137)
|
||||
#define FUSION_DEREF_IMPL_07162005_0137
|
||||
|
||||
#include <boost/fusion/iterator/detail/adapt_deref_traits.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct joint_view_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct deref_impl;
|
||||
|
||||
template <>
|
||||
struct deref_impl<joint_view_iterator_tag>
|
||||
: detail::adapt_deref_traits {};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
40
test/external/boost/fusion/view/joint_view/detail/end_impl.hpp
vendored
Normal file
40
test/external/boost/fusion/view/joint_view/detail/end_impl.hpp
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/*=============================================================================
|
||||
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_07162005_0128)
|
||||
#define FUSION_END_IMPL_07162005_0128
|
||||
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct joint_view_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct end_impl;
|
||||
|
||||
template <>
|
||||
struct end_impl<joint_view_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Sequence::concat_last_type type;
|
||||
|
||||
static type
|
||||
call(Sequence& s)
|
||||
{
|
||||
return s.concat_last();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
28
test/external/boost/fusion/view/joint_view/detail/key_of_impl.hpp
vendored
Normal file
28
test/external/boost/fusion/view/joint_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_JOINT_VIEW_DETAIL_KEY_OF_IMPL_HPP
|
||||
#define BOOST_FUSION_VIEW_JOINT_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<joint_view_iterator_tag>
|
||||
{
|
||||
template <typename It>
|
||||
struct apply
|
||||
: result_of::key_of<typename It::first_type>
|
||||
{};
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
71
test/external/boost/fusion/view/joint_view/detail/next_impl.hpp
vendored
Normal file
71
test/external/boost/fusion/view/joint_view/detail/next_impl.hpp
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/*=============================================================================
|
||||
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_07162005_0136)
|
||||
#define FUSION_NEXT_IMPL_07162005_0136
|
||||
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct joint_view_iterator_tag;
|
||||
|
||||
template <typename Category, typename First, typename Last, typename Concat>
|
||||
struct joint_view_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct next_impl;
|
||||
|
||||
template <>
|
||||
struct next_impl<joint_view_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::first_type first_type;
|
||||
typedef typename Iterator::last_type last_type;
|
||||
typedef typename Iterator::concat_type concat_type;
|
||||
typedef typename Iterator::category category;
|
||||
typedef typename result_of::next<first_type>::type next_type;
|
||||
typedef result_of::equal_to<next_type, last_type> equal_to;
|
||||
|
||||
typedef typename
|
||||
mpl::if_<
|
||||
equal_to
|
||||
, concat_type
|
||||
, joint_view_iterator<category, next_type, last_type, concat_type>
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i, mpl::true_)
|
||||
{
|
||||
return i.concat;
|
||||
}
|
||||
|
||||
static type
|
||||
call(Iterator const& i, mpl::false_)
|
||||
{
|
||||
return type(fusion::next(i.first), i.concat);
|
||||
}
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return call(i, equal_to());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
28
test/external/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp
vendored
Normal file
28
test/external/boost/fusion/view/joint_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_JOINT_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
|
||||
#define BOOST_FUSION_VIEW_JOINT_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<joint_view_iterator_tag>
|
||||
{
|
||||
template <typename It>
|
||||
struct apply
|
||||
: result_of::value_of_data<typename It::first_type>
|
||||
{};
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
29
test/external/boost/fusion/view/joint_view/detail/value_of_impl.hpp
vendored
Normal file
29
test/external/boost/fusion/view/joint_view/detail/value_of_impl.hpp
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*=============================================================================
|
||||
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_IMPL_07162005_0132)
|
||||
#define FUSION_VALUE_IMPL_07162005_0132
|
||||
|
||||
#include <boost/fusion/iterator/detail/adapt_value_traits.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct joint_view_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_of_impl;
|
||||
|
||||
template <>
|
||||
struct value_of_impl<joint_view_iterator_tag>
|
||||
: detail::adapt_value_traits {};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
78
test/external/boost/fusion/view/joint_view/joint_view.hpp
vendored
Normal file
78
test/external/boost/fusion/view/joint_view/joint_view.hpp
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
/*=============================================================================
|
||||
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_JOINT_VIEW_07162005_0140)
|
||||
#define FUSION_JOINT_VIEW_07162005_0140
|
||||
|
||||
#include <boost/fusion/view/joint_view/joint_view_fwd.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/support/is_view.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/view/joint_view/joint_view_iterator.hpp>
|
||||
#include <boost/fusion/view/joint_view/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/view/joint_view/detail/end_impl.hpp>
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/plus.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 joint_view_tag;
|
||||
struct forward_traversal_tag;
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
template <typename Sequence1, typename Sequence2>
|
||||
struct joint_view : sequence_base<joint_view<Sequence1, Sequence2> >
|
||||
{
|
||||
typedef joint_view_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
mpl::and_<
|
||||
traits::is_associative<Sequence1>
|
||||
, traits::is_associative<Sequence2>
|
||||
>
|
||||
, mpl::inherit2<forward_traversal_tag,associative_tag>
|
||||
, mpl::identity<forward_traversal_tag>
|
||||
>::type
|
||||
category;
|
||||
typedef mpl::true_ is_view;
|
||||
|
||||
typedef typename result_of::begin<Sequence1>::type first_type;
|
||||
typedef typename result_of::end<Sequence1>::type last_type;
|
||||
typedef typename result_of::begin<Sequence2>::type concat_type;
|
||||
typedef typename result_of::end<Sequence2>::type concat_last_type;
|
||||
typedef typename mpl::int_<
|
||||
result_of::size<Sequence1>::value + result_of::size<Sequence2>::value>
|
||||
size;
|
||||
|
||||
joint_view(Sequence1& in_seq1, Sequence2& in_seq2)
|
||||
: seq1(in_seq1)
|
||||
, seq2(in_seq2)
|
||||
{}
|
||||
|
||||
first_type first() const { return fusion::begin(seq1); }
|
||||
concat_type concat() const { return fusion::begin(seq2); }
|
||||
concat_last_type concat_last() const { return fusion::end(seq2); }
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
joint_view& operator= (joint_view const&);
|
||||
|
||||
typename mpl::if_<traits::is_view<Sequence1>, Sequence1, Sequence1&>::type seq1;
|
||||
typename mpl::if_<traits::is_view<Sequence2>, Sequence2, Sequence2&>::type seq2;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
18
test/external/boost/fusion/view/joint_view/joint_view_fwd.hpp
vendored
Normal file
18
test/external/boost/fusion/view/joint_view/joint_view_fwd.hpp
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 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_JOINT_VIEW_FWD_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_JOINT_VIEW_FWD_HPP_INCLUDED
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct joint_view_tag;
|
||||
|
||||
template <typename Sequence1, typename Sequence2>
|
||||
struct joint_view;
|
||||
}}
|
||||
|
||||
#endif
|
||||
59
test/external/boost/fusion/view/joint_view/joint_view_iterator.hpp
vendored
Normal file
59
test/external/boost/fusion/view/joint_view/joint_view_iterator.hpp
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
/*=============================================================================
|
||||
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_JOINT_VIEW_ITERATOR_07162005_0140)
|
||||
#define FUSION_JOINT_VIEW_ITERATOR_07162005_0140
|
||||
|
||||
#include <boost/fusion/support/iterator_base.hpp>
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
|
||||
#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
|
||||
#include <boost/fusion/view/joint_view/detail/deref_impl.hpp>
|
||||
#include <boost/fusion/view/joint_view/detail/next_impl.hpp>
|
||||
#include <boost/fusion/view/joint_view/detail/value_of_impl.hpp>
|
||||
#include <boost/fusion/view/joint_view/detail/deref_data_impl.hpp>
|
||||
#include <boost/fusion/view/joint_view/detail/value_of_data_impl.hpp>
|
||||
#include <boost/fusion/view/joint_view/detail/key_of_impl.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct joint_view_iterator_tag;
|
||||
struct forward_traversal_tag;
|
||||
|
||||
template <typename Category, typename First, typename Last, typename Concat>
|
||||
struct joint_view_iterator
|
||||
: iterator_base<joint_view_iterator<Category, First, Last, Concat> >
|
||||
{
|
||||
typedef convert_iterator<First> first_converter;
|
||||
typedef convert_iterator<Last> last_converter;
|
||||
typedef convert_iterator<Concat> concat_converter;
|
||||
|
||||
typedef typename first_converter::type first_type;
|
||||
typedef typename last_converter::type last_type;
|
||||
typedef typename concat_converter::type concat_type;
|
||||
|
||||
typedef joint_view_iterator_tag fusion_tag;
|
||||
typedef Category category;
|
||||
BOOST_STATIC_ASSERT((!result_of::equal_to<first_type, last_type>::value));
|
||||
|
||||
joint_view_iterator(First const& in_first, Concat const& in_concat)
|
||||
: first(first_converter::call(in_first))
|
||||
, concat(concat_converter::call(in_concat))
|
||||
{}
|
||||
|
||||
first_type first;
|
||||
concat_type concat;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
joint_view_iterator& operator= (joint_view_iterator const&);
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user