diff options
Diffstat (limited to 'boost/fusion/iterator/iterator_adapter.hpp')
-rw-r--r-- | boost/fusion/iterator/iterator_adapter.hpp | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/boost/fusion/iterator/iterator_adapter.hpp b/boost/fusion/iterator/iterator_adapter.hpp index af6978b20e..de8938f6ce 100644 --- a/boost/fusion/iterator/iterator_adapter.hpp +++ b/boost/fusion/iterator/iterator_adapter.hpp @@ -8,14 +8,21 @@ #define FUSION_ITERATOR_ADAPTER_08112011_0942 #include <boost/fusion/support/config.hpp> -#include <boost/fusion/iterator/detail/advance.hpp> +#include <boost/fusion/support/category_of.hpp> +#include <boost/fusion/iterator/advance.hpp> +#include <boost/fusion/iterator/deref.hpp> +#include <boost/fusion/iterator/distance.hpp> +#include <boost/fusion/iterator/equal_to.hpp> #include <boost/fusion/iterator/iterator_facade.hpp> +#include <boost/fusion/iterator/next.hpp> +#include <boost/fusion/iterator/prior.hpp> +#include <boost/fusion/iterator/value_of.hpp> #include <boost/type_traits/remove_const.hpp> namespace boost { namespace fusion { template <typename Derived_, typename Iterator_, - typename Category = typename Iterator_::category> + typename Category = typename traits::category_of<Iterator_>::type> struct iterator_adapter : iterator_facade<Derived_, Category> { @@ -24,7 +31,7 @@ namespace boost { namespace fusion iterator_base_type; iterator_base_type iterator_base; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED iterator_adapter(iterator_base_type const& iterator_base_) : iterator_base(iterator_base_) {} @@ -47,7 +54,7 @@ namespace boost { namespace fusion >::type>::type type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& it) { @@ -82,7 +89,7 @@ namespace boost { namespace fusion >::type type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& it) { @@ -100,7 +107,7 @@ namespace boost { namespace fusion >::type>::type type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& i) { @@ -118,7 +125,7 @@ namespace boost { namespace fusion >::type>::type type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& i) { @@ -128,4 +135,13 @@ namespace boost { namespace fusion }; }} +#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 +namespace std +{ + template <typename Derived, typename Iterator, typename Category> + struct iterator_traits< ::boost::fusion::iterator_adapter<Derived, Iterator, Category> > + { }; +} +#endif + #endif |