Added boost header
This commit is contained in:
49
test/external/boost/fusion/view/nview/detail/advance_impl.hpp
vendored
Normal file
49
test/external/boost/fusion/view/nview/detail/advance_impl.hpp
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_NVIEW_ADVANCE_IMPL_SEP_24_2009_0212PM)
|
||||
#define BOOST_FUSION_NVIEW_ADVANCE_IMPL_SEP_24_2009_0212PM
|
||||
|
||||
#include <boost/mpl/advance.hpp>
|
||||
#include <boost/fusion/iterator/advance.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_iterator_tag;
|
||||
|
||||
template <typename Sequence, typename Pos>
|
||||
struct nview_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct advance_impl;
|
||||
|
||||
template<>
|
||||
struct advance_impl<nview_iterator_tag>
|
||||
{
|
||||
template<typename Iterator, typename Dist>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::first_type::iterator_type iterator_type;
|
||||
typedef typename Iterator::sequence_type sequence_type;
|
||||
|
||||
typedef nview_iterator<sequence_type,
|
||||
typename mpl::advance<iterator_type, Dist>::type> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.seq);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
45
test/external/boost/fusion/view/nview/detail/at_impl.hpp
vendored
Normal file
45
test/external/boost/fusion/view/nview/detail/at_impl.hpp
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_NVIEW_AT_IMPL_SEP_24_2009_0225PM)
|
||||
#define BOOST_FUSION_NVIEW_AT_IMPL_SEP_24_2009_0225PM
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct at_impl;
|
||||
|
||||
template<>
|
||||
struct at_impl<nview_tag>
|
||||
{
|
||||
template<typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Sequence::sequence_type sequence_type;
|
||||
typedef typename Sequence::index_type index_type;
|
||||
|
||||
typedef typename result_of::at<index_type, N>::type index;
|
||||
typedef typename result_of::at<sequence_type, index>::type type;
|
||||
|
||||
static type
|
||||
call(Sequence& seq)
|
||||
{
|
||||
return fusion::at<index>(seq.seq);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
48
test/external/boost/fusion/view/nview/detail/begin_impl.hpp
vendored
Normal file
48
test/external/boost/fusion/view/nview/detail/begin_impl.hpp
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_NVIEW_BEGIN_IMPL_SEP_23_2009_1036PM)
|
||||
#define BOOST_FUSION_NVIEW_BEGIN_IMPL_SEP_23_2009_1036PM
|
||||
|
||||
#include <boost/mpl/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_tag;
|
||||
|
||||
template <typename Sequence, typename Pos>
|
||||
struct nview_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct begin_impl;
|
||||
|
||||
template<>
|
||||
struct begin_impl<nview_tag>
|
||||
{
|
||||
template<typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Sequence::index_type index_type;
|
||||
|
||||
typedef nview_iterator<Sequence,
|
||||
typename mpl::begin<index_type>::type> type;
|
||||
|
||||
static type call(Sequence& s)
|
||||
{
|
||||
return type(s);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
48
test/external/boost/fusion/view/nview/detail/deref_impl.hpp
vendored
Normal file
48
test/external/boost/fusion/view/nview/detail/deref_impl.hpp
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_NVIEW_DEREF_IMPL_SEP_24_2009_0818AM)
|
||||
#define BOOST_FUSION_NVIEW_DEREF_IMPL_SEP_24_2009_0818AM
|
||||
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/container/vector.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct deref_impl;
|
||||
|
||||
template<>
|
||||
struct deref_impl<nview_iterator_tag>
|
||||
{
|
||||
template<typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::first_type first_type;
|
||||
typedef typename Iterator::sequence_type sequence_type;
|
||||
|
||||
typedef typename result_of::deref<first_type>::type index;
|
||||
typedef typename result_of::at<
|
||||
typename sequence_type::sequence_type, index>::type type;
|
||||
|
||||
static type call(Iterator const& i)
|
||||
{
|
||||
return at<index>(i.seq.seq);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
44
test/external/boost/fusion/view/nview/detail/distance_impl.hpp
vendored
Normal file
44
test/external/boost/fusion/view/nview/detail/distance_impl.hpp
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_NVIEW_DISTANCE_IMPL_SEP_23_2009_0328PM)
|
||||
#define BOOST_FUSION_NVIEW_DISTANCE_IMPL_SEP_23_2009_0328PM
|
||||
|
||||
#include <boost/fusion/iterator/distance.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct distance_impl;
|
||||
|
||||
template<>
|
||||
struct distance_impl<nview_iterator_tag>
|
||||
{
|
||||
template<typename First, typename Last>
|
||||
struct apply
|
||||
: result_of::distance<typename First::first_type, typename Last::first_type>
|
||||
{
|
||||
typedef typename result_of::distance<
|
||||
typename First::first_type, typename Last::first_type
|
||||
>::type type;
|
||||
|
||||
static type
|
||||
call(First const& /*first*/, Last const& /*last*/)
|
||||
{
|
||||
return type();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
50
test/external/boost/fusion/view/nview/detail/end_impl.hpp
vendored
Normal file
50
test/external/boost/fusion/view/nview/detail/end_impl.hpp
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_NVIEW_END_IMPL_SEP_24_2009_0140PM)
|
||||
#define BOOST_FUSION_NVIEW_END_IMPL_SEP_24_2009_0140PM
|
||||
|
||||
#include <boost/mpl/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_tag;
|
||||
|
||||
template <typename Sequence, typename Pos>
|
||||
struct nview_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct end_impl;
|
||||
|
||||
// Unary Version
|
||||
template <>
|
||||
struct end_impl<nview_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Sequence::index_type index_type;
|
||||
|
||||
typedef nview_iterator<Sequence,
|
||||
typename mpl::end<index_type>::type> type;
|
||||
|
||||
static type call(Sequence& s)
|
||||
{
|
||||
return type(s);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
33
test/external/boost/fusion/view/nview/detail/equal_to_impl.hpp
vendored
Normal file
33
test/external/boost/fusion/view/nview/detail/equal_to_impl.hpp
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_NVIEW_ITERATOR_SEP_24_2009_0329PM)
|
||||
#define BOOST_FUSION_NVIEW_ITERATOR_SEP_24_2009_0329PM
|
||||
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct equal_to_impl;
|
||||
|
||||
template<>
|
||||
struct equal_to_impl<nview_iterator_tag>
|
||||
{
|
||||
template<typename It1, typename It2>
|
||||
struct apply
|
||||
: result_of::equal_to<typename It1::first_type, typename It2::first_type>
|
||||
{};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
48
test/external/boost/fusion/view/nview/detail/next_impl.hpp
vendored
Normal file
48
test/external/boost/fusion/view/nview/detail/next_impl.hpp
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_NVIEW_NEXT_IMPL_SEP_24_2009_0116PM)
|
||||
#define BOOST_FUSION_NVIEW_NEXT_IMPL_SEP_24_2009_0116PM
|
||||
|
||||
#include <boost/mpl/next.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_iterator_tag;
|
||||
|
||||
template <typename Sequence, typename Pos>
|
||||
struct nview_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct next_impl;
|
||||
|
||||
template <>
|
||||
struct next_impl<nview_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::first_type::iterator_type first_type;
|
||||
typedef typename Iterator::sequence_type sequence_type;
|
||||
|
||||
typedef nview_iterator<sequence_type,
|
||||
typename mpl::next<first_type>::type> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.seq);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
77
test/external/boost/fusion/view/nview/detail/nview_impl.hpp
vendored
Normal file
77
test/external/boost/fusion/view/nview/detail/nview_impl.hpp
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_PP_IS_ITERATING
|
||||
|
||||
#if !defined(BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM)
|
||||
#define BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM
|
||||
|
||||
#include <climits>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/repeat.hpp>
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
|
||||
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3, (1, FUSION_MAX_VECTOR_SIZE, \
|
||||
"boost/fusion/view/nview/detail/nview_impl.hpp")) \
|
||||
/**/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
namespace boost { namespace fusion { namespace result_of
|
||||
{
|
||||
template <typename Sequence
|
||||
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, LONG_MAX)>
|
||||
struct as_nview
|
||||
{
|
||||
typedef mpl::vector_c<
|
||||
int, BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, I)
|
||||
> index_type;
|
||||
typedef nview<Sequence, index_type> type;
|
||||
};
|
||||
}}}
|
||||
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Preprocessor vertical repetition code
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#else // defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
#if N < FUSION_MAX_VECTOR_SIZE
|
||||
namespace boost { namespace fusion { namespace result_of
|
||||
{
|
||||
template <typename Sequence, BOOST_PP_ENUM_PARAMS(N, int I)>
|
||||
struct as_nview<Sequence, BOOST_PP_ENUM_PARAMS(N, I)>
|
||||
{
|
||||
typedef mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> index_type;
|
||||
typedef nview<Sequence, index_type> type;
|
||||
};
|
||||
}}}
|
||||
#endif
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
template<BOOST_PP_ENUM_PARAMS(N, int I), typename Sequence>
|
||||
inline nview<Sequence, mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> >
|
||||
as_nview(Sequence& s)
|
||||
{
|
||||
typedef mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> index_type;
|
||||
return nview<Sequence, index_type>(s);
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#undef N
|
||||
|
||||
#endif
|
||||
48
test/external/boost/fusion/view/nview/detail/prior_impl.hpp
vendored
Normal file
48
test/external/boost/fusion/view/nview/detail/prior_impl.hpp
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_NVIEW_PRIOR_IMPL_SEP_24_2009_0142PM)
|
||||
#define BOOST_FUSION_NVIEW_PRIOR_IMPL_SEP_24_2009_0142PM
|
||||
|
||||
#include <boost/mpl/prior.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_iterator_tag;
|
||||
|
||||
template <typename Sequence, typename Pos>
|
||||
struct nview_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct prior_impl;
|
||||
|
||||
template <>
|
||||
struct prior_impl<nview_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::first_type::iterator_type first_type;
|
||||
typedef typename Iterator::sequence_type sequence_type;
|
||||
|
||||
typedef nview_iterator<sequence_type,
|
||||
typename mpl::prior<first_type>::type> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.seq);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
38
test/external/boost/fusion/view/nview/detail/size_impl.hpp
vendored
Normal file
38
test/external/boost/fusion/view/nview/detail/size_impl.hpp
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*=============================================================================
|
||||
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_NVIEW_SIZE_IMPL_OCT_06_2009_0525PM)
|
||||
#define FUSION_NVIEW_SIZE_IMPL_OCT_06_2009_0525PM
|
||||
|
||||
#include <boost/fusion/iterator/distance.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct size_impl;
|
||||
|
||||
template <>
|
||||
struct size_impl<nview_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
: result_of::distance<
|
||||
typename result_of::begin<Sequence>::type
|
||||
, typename result_of::end<Sequence>::type>
|
||||
{};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
39
test/external/boost/fusion/view/nview/detail/value_at_impl.hpp
vendored
Normal file
39
test/external/boost/fusion/view/nview/detail/value_at_impl.hpp
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_NVIEW_VALUE_AT_IMPL_SEP_24_2009_0234PM)
|
||||
#define BOOST_FUSION_NVIEW_VALUE_AT_IMPL_SEP_24_2009_0234PM
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct value_at_impl;
|
||||
|
||||
template<>
|
||||
struct value_at_impl<nview_tag>
|
||||
{
|
||||
template<typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Sequence::sequence_type sequence_type;
|
||||
typedef typename Sequence::index_type index_type;
|
||||
|
||||
typedef typename result_of::at<index_type, N>::type index;
|
||||
typedef typename result_of::at<sequence_type, index>::type type;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
44
test/external/boost/fusion/view/nview/detail/value_of_impl.hpp
vendored
Normal file
44
test/external/boost/fusion/view/nview/detail/value_of_impl.hpp
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_VALUE_OF_PRIOR_IMPL_SEP_24_2009_0158PM)
|
||||
#define BOOST_FUSION_VALUE_OF_PRIOR_IMPL_SEP_24_2009_0158PM
|
||||
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/container/vector.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_iterator_tag;
|
||||
|
||||
template <typename Sequence, typename Pos>
|
||||
struct nview_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_of_impl;
|
||||
|
||||
template <>
|
||||
struct value_of_impl<nview_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::first_type first_type;
|
||||
typedef typename Iterator::sequence_type sequence_type;
|
||||
|
||||
typedef typename result_of::deref<first_type>::type index;
|
||||
typedef typename result_of::at<
|
||||
typename sequence_type::sequence_type, index>::type type;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
109
test/external/boost/fusion/view/nview/nview.hpp
vendored
Normal file
109
test/external/boost/fusion/view/nview/nview.hpp
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_NVIEW_SEP_23_2009_0948PM)
|
||||
#define BOOST_FUSION_NVIEW_SEP_23_2009_0948PM
|
||||
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/vector_c.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
|
||||
#include <boost/fusion/support/is_view.hpp>
|
||||
#include <boost/fusion/support/category_of.hpp>
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/container/vector.hpp>
|
||||
#include <boost/fusion/view/transform_view.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
struct addref
|
||||
{
|
||||
template<typename Sig>
|
||||
struct result;
|
||||
|
||||
template<typename U>
|
||||
struct result<addref(U)> : add_reference<U> {};
|
||||
|
||||
template <typename T>
|
||||
typename add_reference<T>::type
|
||||
operator()(T& x) const
|
||||
{
|
||||
return x;
|
||||
}
|
||||
};
|
||||
|
||||
struct addconstref
|
||||
{
|
||||
template<typename Sig>
|
||||
struct result;
|
||||
|
||||
template<typename U>
|
||||
struct result<addconstref(U)>
|
||||
: add_reference<typename add_const<U>::type>
|
||||
{};
|
||||
|
||||
template <typename T>
|
||||
typename add_reference<typename add_const<T>::type>::type
|
||||
operator()(T& x) const
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
typename add_reference<typename add_const<T>::type>::type
|
||||
operator()(T const& x) const
|
||||
{
|
||||
return x;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
struct nview_tag;
|
||||
struct random_access_traversal_tag;
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
template<typename Sequence, typename Indicies>
|
||||
struct nview
|
||||
: sequence_base<nview<Sequence, Indicies> >
|
||||
{
|
||||
typedef nview_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
||||
typedef random_access_traversal_tag category;
|
||||
|
||||
typedef mpl::true_ is_view;
|
||||
typedef Indicies index_type;
|
||||
typedef typename mpl::size<Indicies>::type size;
|
||||
|
||||
typedef typename mpl::if_<
|
||||
is_const<Sequence>, detail::addconstref, detail::addref
|
||||
>::type transform_type;
|
||||
typedef transform_view<Sequence, transform_type> transform_view_type;
|
||||
typedef typename result_of::as_vector<transform_view_type>::type
|
||||
sequence_type;
|
||||
|
||||
explicit nview(Sequence& val)
|
||||
: seq(sequence_type(transform_view_type(val, transform_type())))
|
||||
{}
|
||||
|
||||
sequence_type seq;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
// define the nview() generator functions
|
||||
#include <boost/fusion/view/nview/detail/nview_impl.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
58
test/external/boost/fusion/view/nview/nview_iterator.hpp
vendored
Normal file
58
test/external/boost/fusion/view/nview/nview_iterator.hpp
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009 Hartmut Kaiser
|
||||
|
||||
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_NVIEW_ITERATOR_SEP_23_2009_0948PM)
|
||||
#define BOOST_FUSION_NVIEW_ITERATOR_SEP_23_2009_0948PM
|
||||
|
||||
#include <boost/fusion/support/iterator_base.hpp>
|
||||
#include <boost/fusion/support/category_of.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
|
||||
|
||||
#include <boost/fusion/view/nview/detail/size_impl.hpp>
|
||||
#include <boost/fusion/view/nview/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/view/nview/detail/end_impl.hpp>
|
||||
#include <boost/fusion/view/nview/detail/deref_impl.hpp>
|
||||
#include <boost/fusion/view/nview/detail/value_of_impl.hpp>
|
||||
#include <boost/fusion/view/nview/detail/next_impl.hpp>
|
||||
#include <boost/fusion/view/nview/detail/prior_impl.hpp>
|
||||
#include <boost/fusion/view/nview/detail/at_impl.hpp>
|
||||
#include <boost/fusion/view/nview/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/view/nview/detail/advance_impl.hpp>
|
||||
#include <boost/fusion/view/nview/detail/distance_impl.hpp>
|
||||
#include <boost/fusion/view/nview/detail/equal_to_impl.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nview_iterator_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
template<typename Sequence, typename Pos>
|
||||
struct nview_iterator
|
||||
: iterator_base<nview_iterator<Sequence, Pos> >
|
||||
{
|
||||
typedef nview_iterator_tag fusion_tag;
|
||||
typedef random_access_traversal_tag category;
|
||||
|
||||
typedef Sequence sequence_type;
|
||||
typedef mpl_iterator<Pos> first_type;
|
||||
|
||||
explicit nview_iterator(Sequence& in_seq)
|
||||
: seq(in_seq) {}
|
||||
|
||||
Sequence& seq;
|
||||
|
||||
private:
|
||||
// silence MSVC warning C4512: assignment operator could not be generated
|
||||
nview_iterator& operator= (nview_iterator const&);
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user