summaryrefslogtreecommitdiff
path: root/boost/fusion/view
diff options
context:
space:
mode:
Diffstat (limited to 'boost/fusion/view')
-rw-r--r--boost/fusion/view/detail/strictest_traversal.hpp2
-rw-r--r--boost/fusion/view/flatten_view.hpp4
-rw-r--r--boost/fusion/view/flatten_view/flatten_view.hpp4
-rw-r--r--boost/fusion/view/flatten_view/flatten_view_iterator.hpp4
-rw-r--r--boost/fusion/view/nview/detail/advance_impl.hpp9
-rw-r--r--boost/fusion/view/nview/detail/at_impl.hpp3
-rw-r--r--boost/fusion/view/nview/detail/begin_impl.hpp5
-rw-r--r--boost/fusion/view/nview/detail/cpp03/nview_impl.hpp5
-rw-r--r--boost/fusion/view/nview/detail/deref_impl.hpp6
-rw-r--r--boost/fusion/view/nview/detail/end_impl.hpp5
-rw-r--r--boost/fusion/view/nview/detail/next_impl.hpp8
-rw-r--r--boost/fusion/view/nview/detail/nview_impl.hpp32
-rw-r--r--boost/fusion/view/nview/detail/prior_impl.hpp8
-rw-r--r--boost/fusion/view/nview/nview.hpp8
-rw-r--r--boost/fusion/view/nview/nview_iterator.hpp3
15 files changed, 67 insertions, 39 deletions
diff --git a/boost/fusion/view/detail/strictest_traversal.hpp b/boost/fusion/view/detail/strictest_traversal.hpp
index 9ad1f7aa85..4092ea4da6 100644
--- a/boost/fusion/view/detail/strictest_traversal.hpp
+++ b/boost/fusion/view/detail/strictest_traversal.hpp
@@ -59,7 +59,7 @@ namespace boost { namespace fusion
// never called, but needed for decltype-based result_of (C++0x)
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template<typename StrictestSoFar, typename Next>
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ BOOST_FUSION_GPU_ENABLED
typename result<strictest_traversal_impl(StrictestSoFar, Next)>::type
operator()(StrictestSoFar&&, Next&&) const;
#endif
diff --git a/boost/fusion/view/flatten_view.hpp b/boost/fusion/view/flatten_view.hpp
index dcef08dec7..25428544d6 100644
--- a/boost/fusion/view/flatten_view.hpp
+++ b/boost/fusion/view/flatten_view.hpp
@@ -1,9 +1,9 @@
-/*//////////////////////////////////////////////////////////////////////////////
+/*==============================================================================
Copyright (c) 2013 Jamboree
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_SEQUENCE_FLATTEN_VIEW_HPP_INCLUDED
#define BOOST_FUSION_SEQUENCE_FLATTEN_VIEW_HPP_INCLUDED
diff --git a/boost/fusion/view/flatten_view/flatten_view.hpp b/boost/fusion/view/flatten_view/flatten_view.hpp
index 8e40158d1c..401f65dc86 100644
--- a/boost/fusion/view/flatten_view/flatten_view.hpp
+++ b/boost/fusion/view/flatten_view/flatten_view.hpp
@@ -1,9 +1,9 @@
-/*//////////////////////////////////////////////////////////////////////////////
+/*==============================================================================
Copyright (c) 2013 Jamboree
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_FLATTEN_VIEW_HPP_INCLUDED
#define BOOST_FUSION_FLATTEN_VIEW_HPP_INCLUDED
diff --git a/boost/fusion/view/flatten_view/flatten_view_iterator.hpp b/boost/fusion/view/flatten_view/flatten_view_iterator.hpp
index 1ecf692822..be115d910b 100644
--- a/boost/fusion/view/flatten_view/flatten_view_iterator.hpp
+++ b/boost/fusion/view/flatten_view/flatten_view_iterator.hpp
@@ -1,9 +1,9 @@
-/*//////////////////////////////////////////////////////////////////////////////
+/*==============================================================================
Copyright (c) 2013 Jamboree
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_FLATTEN_VIEW_ITERATOR_HPP_INCLUDED
#define BOOST_FUSION_FLATTEN_VIEW_ITERATOR_HPP_INCLUDED
diff --git a/boost/fusion/view/nview/detail/advance_impl.hpp b/boost/fusion/view/nview/detail/advance_impl.hpp
index 7c74a386bb..c46414337f 100644
--- a/boost/fusion/view/nview/detail/advance_impl.hpp
+++ b/boost/fusion/view/nview/detail/advance_impl.hpp
@@ -1,7 +1,7 @@
/*=============================================================================
Copyright (c) 2009 Hartmut Kaiser
- 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)
==============================================================================*/
@@ -9,7 +9,6 @@
#define BOOST_FUSION_NVIEW_ADVANCE_IMPL_SEP_24_2009_0212PM
#include <boost/fusion/support/config.hpp>
-#include <boost/mpl/advance.hpp>
#include <boost/fusion/iterator/advance.hpp>
namespace boost { namespace fusion
@@ -30,11 +29,11 @@ namespace boost { namespace fusion
template<typename Iterator, typename Dist>
struct apply
{
- typedef typename Iterator::first_type::iterator_type iterator_type;
+ typedef typename Iterator::first_type iterator_type;
typedef typename Iterator::sequence_type sequence_type;
- typedef nview_iterator<sequence_type,
- typename mpl::advance<iterator_type, Dist>::type> type;
+ typedef nview_iterator<sequence_type,
+ typename result_of::advance<iterator_type, Dist>::type> type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
diff --git a/boost/fusion/view/nview/detail/at_impl.hpp b/boost/fusion/view/nview/detail/at_impl.hpp
index b9f41defcd..9f8c163708 100644
--- a/boost/fusion/view/nview/detail/at_impl.hpp
+++ b/boost/fusion/view/nview/detail/at_impl.hpp
@@ -10,6 +10,7 @@
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
namespace boost { namespace fusion
{
@@ -29,7 +30,7 @@ namespace boost { namespace fusion
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::value_at<index_type, N>::type index;
typedef typename result_of::at<sequence_type, index>::type type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
diff --git a/boost/fusion/view/nview/detail/begin_impl.hpp b/boost/fusion/view/nview/detail/begin_impl.hpp
index bab5e221c9..99e6319ea8 100644
--- a/boost/fusion/view/nview/detail/begin_impl.hpp
+++ b/boost/fusion/view/nview/detail/begin_impl.hpp
@@ -9,7 +9,6 @@
#define BOOST_FUSION_NVIEW_BEGIN_IMPL_SEP_23_2009_1036PM
#include <boost/fusion/support/config.hpp>
-#include <boost/mpl/begin.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
namespace boost { namespace fusion
@@ -32,8 +31,8 @@ namespace boost { namespace fusion
{
typedef typename Sequence::index_type index_type;
- typedef nview_iterator<Sequence,
- typename mpl::begin<index_type>::type> type;
+ typedef nview_iterator<Sequence,
+ typename result_of::begin<index_type>::type> type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& s)
diff --git a/boost/fusion/view/nview/detail/cpp03/nview_impl.hpp b/boost/fusion/view/nview/detail/cpp03/nview_impl.hpp
index 08c6c9d738..0bcea9bb91 100644
--- a/boost/fusion/view/nview/detail/cpp03/nview_impl.hpp
+++ b/boost/fusion/view/nview/detail/cpp03/nview_impl.hpp
@@ -17,10 +17,13 @@
#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>
+#include <boost/mpl/vector_c.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
#define BOOST_PP_ITERATION_PARAMS_1 \
(3, (1, FUSION_MAX_VECTOR_SIZE, \
- "boost/fusion/view/nview/detail/cpp03/nview_impl.hpp")) \
+ "boost/fusion/view/nview/detail/cpp03/nview_impl.hpp")) \
/**/
///////////////////////////////////////////////////////////////////////////////
diff --git a/boost/fusion/view/nview/detail/deref_impl.hpp b/boost/fusion/view/nview/detail/deref_impl.hpp
index 85991021b6..57654aa057 100644
--- a/boost/fusion/view/nview/detail/deref_impl.hpp
+++ b/boost/fusion/view/nview/detail/deref_impl.hpp
@@ -9,8 +9,8 @@
#define BOOST_FUSION_NVIEW_DEREF_IMPL_SEP_24_2009_0818AM
#include <boost/fusion/support/config.hpp>
-#include <boost/fusion/iterator/deref.hpp>
-#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
namespace boost { namespace fusion
{
@@ -30,7 +30,7 @@ namespace boost { namespace fusion
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::value_of<first_type>::type index;
typedef typename result_of::at<
typename sequence_type::sequence_type, index>::type type;
diff --git a/boost/fusion/view/nview/detail/end_impl.hpp b/boost/fusion/view/nview/detail/end_impl.hpp
index 0a6efe560d..810aea917a 100644
--- a/boost/fusion/view/nview/detail/end_impl.hpp
+++ b/boost/fusion/view/nview/detail/end_impl.hpp
@@ -9,7 +9,6 @@
#define BOOST_FUSION_NVIEW_END_IMPL_SEP_24_2009_0140PM
#include <boost/fusion/support/config.hpp>
-#include <boost/mpl/end.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
namespace boost { namespace fusion
@@ -33,8 +32,8 @@ namespace boost { namespace fusion
{
typedef typename Sequence::index_type index_type;
- typedef nview_iterator<Sequence,
- typename mpl::end<index_type>::type> type;
+ typedef nview_iterator<Sequence,
+ typename result_of::end<index_type>::type> type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& s)
diff --git a/boost/fusion/view/nview/detail/next_impl.hpp b/boost/fusion/view/nview/detail/next_impl.hpp
index 3c30409647..821d9c3768 100644
--- a/boost/fusion/view/nview/detail/next_impl.hpp
+++ b/boost/fusion/view/nview/detail/next_impl.hpp
@@ -9,7 +9,7 @@
#define BOOST_FUSION_NVIEW_NEXT_IMPL_SEP_24_2009_0116PM
#include <boost/fusion/support/config.hpp>
-#include <boost/mpl/next.hpp>
+#include <boost/fusion/iterator/next.hpp>
namespace boost { namespace fusion
{
@@ -27,13 +27,13 @@ namespace boost { namespace fusion
struct next_impl<nview_iterator_tag>
{
template <typename Iterator>
- struct apply
+ struct apply
{
- typedef typename Iterator::first_type::iterator_type first_type;
+ typedef typename Iterator::first_type first_type;
typedef typename Iterator::sequence_type sequence_type;
typedef nview_iterator<sequence_type,
- typename mpl::next<first_type>::type> type;
+ typename result_of::next<first_type>::type> type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
diff --git a/boost/fusion/view/nview/detail/nview_impl.hpp b/boost/fusion/view/nview/detail/nview_impl.hpp
index 40674e3551..0c75a66afa 100644
--- a/boost/fusion/view/nview/detail/nview_impl.hpp
+++ b/boost/fusion/view/nview/detail/nview_impl.hpp
@@ -8,11 +8,43 @@
#define BOOST_FUSION_NVIEW_IMPL_17122014_1948
#include <boost/fusion/support/config.hpp>
+#include <boost/fusion/container/vector/detail/config.hpp>
///////////////////////////////////////////////////////////////////////////////
// Without variadics, we will use the PP version
///////////////////////////////////////////////////////////////////////////////
+#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR)
# include <boost/fusion/view/nview/detail/cpp03/nview_impl.hpp>
+#else
+///////////////////////////////////////////////////////////////////////////////
+// C++11 interface
+///////////////////////////////////////////////////////////////////////////////
+#include <boost/fusion/container/vector.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, int ...I>
+ struct as_nview
+ {
+ typedef vector<mpl::int_<I>...> index_type;
+ typedef nview<Sequence, index_type> type;
+ };
+ }
+
+ template <int ...I, typename Sequence>
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ inline nview<Sequence, vector<mpl::int_<I>...> >
+ as_nview(Sequence& s)
+ {
+ typedef vector<mpl::int_<I>...> index_type;
+ return nview<Sequence, index_type>(s);
+ }
+}}
+
+#endif
#endif
diff --git a/boost/fusion/view/nview/detail/prior_impl.hpp b/boost/fusion/view/nview/detail/prior_impl.hpp
index 470c5bd323..29b63f5692 100644
--- a/boost/fusion/view/nview/detail/prior_impl.hpp
+++ b/boost/fusion/view/nview/detail/prior_impl.hpp
@@ -9,7 +9,7 @@
#define BOOST_FUSION_NVIEW_PRIOR_IMPL_SEP_24_2009_0142PM
#include <boost/fusion/support/config.hpp>
-#include <boost/mpl/prior.hpp>
+#include <boost/fusion/iterator/prior.hpp>
namespace boost { namespace fusion
{
@@ -27,13 +27,13 @@ namespace boost { namespace fusion
struct prior_impl<nview_iterator_tag>
{
template <typename Iterator>
- struct apply
+ struct apply
{
- typedef typename Iterator::first_type::iterator_type first_type;
+ typedef typename Iterator::first_type first_type;
typedef typename Iterator::sequence_type sequence_type;
typedef nview_iterator<sequence_type,
- typename mpl::prior<first_type>::type> type;
+ typename result_of::prior<first_type>::type> type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
diff --git a/boost/fusion/view/nview/nview.hpp b/boost/fusion/view/nview/nview.hpp
index 2e257c81de..e5a4be8ab7 100644
--- a/boost/fusion/view/nview/nview.hpp
+++ b/boost/fusion/view/nview/nview.hpp
@@ -9,19 +9,15 @@
#define BOOST_FUSION_NVIEW_SEP_23_2009_0948PM
#include <boost/fusion/support/config.hpp>
-#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/sequence/intrinsic/size.hpp>
#include <boost/fusion/view/transform_view.hpp>
#include <boost/config.hpp>
@@ -99,7 +95,7 @@ namespace boost { namespace fusion
typedef mpl::true_ is_view;
typedef Indicies index_type;
- typedef typename mpl::size<Indicies>::type size;
+ typedef typename result_of::size<Indicies>::type size;
typedef typename mpl::if_<
is_const<Sequence>, detail::addconstref, detail::addref
diff --git a/boost/fusion/view/nview/nview_iterator.hpp b/boost/fusion/view/nview/nview_iterator.hpp
index aeaf4620b8..42e634e521 100644
--- a/boost/fusion/view/nview/nview_iterator.hpp
+++ b/boost/fusion/view/nview/nview_iterator.hpp
@@ -12,7 +12,6 @@
#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>
@@ -40,7 +39,7 @@ namespace boost { namespace fusion
typedef random_access_traversal_tag category;
typedef Sequence sequence_type;
- typedef mpl_iterator<Pos> first_type;
+ typedef Pos first_type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
explicit nview_iterator(Sequence& in_seq)