diff options
Diffstat (limited to 'boost/fusion/view/transform_view')
10 files changed, 38 insertions, 26 deletions
diff --git a/boost/fusion/view/transform_view/detail/advance_impl.hpp b/boost/fusion/view/transform_view/detail/advance_impl.hpp index ae8a84ce63..12dfabec92 100644 --- a/boost/fusion/view/transform_view/detail/advance_impl.hpp +++ b/boost/fusion/view/transform_view/detail/advance_impl.hpp @@ -39,7 +39,7 @@ namespace boost { namespace fusion typedef typename Iterator::transform_type transform_type; typedef transform_view_iterator<advanced_type, transform_type> type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& i) { @@ -62,7 +62,7 @@ namespace boost { namespace fusion typedef typename Iterator::transform_type transform_type; typedef transform_view_iterator2<advanced1_type, advanced2_type, transform_type> type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& i) { diff --git a/boost/fusion/view/transform_view/detail/at_impl.hpp b/boost/fusion/view/transform_view/detail/at_impl.hpp index 5c6dd8fb0d..d2045bc280 100644 --- a/boost/fusion/view/transform_view/detail/at_impl.hpp +++ b/boost/fusion/view/transform_view/detail/at_impl.hpp @@ -33,7 +33,7 @@ namespace boost { namespace fusion { typedef typename boost::fusion::result_of::at<typename Seq::sequence_type, N>::type value_type; typedef typename mpl::apply<transform_type, value_type>::type type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Seq& seq) { return seq.f(boost::fusion::at<N>(seq.seq)); @@ -53,7 +53,7 @@ namespace boost { namespace fusion { typedef typename boost::fusion::result_of::at<typename Seq::sequence2_type, N>::type value2_type; typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Seq& seq) { return seq.f(boost::fusion::at<N>(seq.seq1), boost::fusion::at<N>(seq.seq2)); diff --git a/boost/fusion/view/transform_view/detail/begin_impl.hpp b/boost/fusion/view/transform_view/detail/begin_impl.hpp index 7c40505ae2..da3f763ab1 100644 --- a/boost/fusion/view/transform_view/detail/begin_impl.hpp +++ b/boost/fusion/view/transform_view/detail/begin_impl.hpp @@ -34,7 +34,7 @@ namespace boost { namespace fusion typedef typename Sequence::transform_type transform_type; typedef transform_view_iterator<first_type, transform_type> type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Sequence& s) { @@ -55,7 +55,7 @@ namespace boost { namespace fusion typedef typename Sequence::transform_type transform_type; typedef transform_view_iterator2<first1_type, first2_type, transform_type> type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Sequence& s) { diff --git a/boost/fusion/view/transform_view/detail/deref_impl.hpp b/boost/fusion/view/transform_view/detail/deref_impl.hpp index 35dacbd1d7..646da57c22 100644 --- a/boost/fusion/view/transform_view/detail/deref_impl.hpp +++ b/boost/fusion/view/transform_view/detail/deref_impl.hpp @@ -37,7 +37,7 @@ namespace boost { namespace fusion typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type; typedef typename mpl::apply<transform_type, value_type>::type type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& i) { @@ -63,7 +63,7 @@ namespace boost { namespace fusion typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type; typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& i) { diff --git a/boost/fusion/view/transform_view/detail/distance_impl.hpp b/boost/fusion/view/transform_view/detail/distance_impl.hpp index ecbc8c5dd0..644430559d 100644 --- a/boost/fusion/view/transform_view/detail/distance_impl.hpp +++ b/boost/fusion/view/transform_view/detail/distance_impl.hpp @@ -29,7 +29,7 @@ namespace boost { namespace fusion { struct apply : result_of::distance<typename First::first_type, typename Last::first_type> { - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static typename result_of::distance<typename First::first_type, typename Last::first_type>::type call(First const& first, Last const& last) @@ -47,7 +47,7 @@ namespace boost { namespace fusion { struct apply : result_of::distance<typename First::first1_type, typename Last::first1_type> { - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static typename result_of::distance<typename First::first1_type, typename Last::first1_type>::type call(First const& first, Last const& last) diff --git a/boost/fusion/view/transform_view/detail/end_impl.hpp b/boost/fusion/view/transform_view/detail/end_impl.hpp index 58e161b1f6..3a84e04093 100644 --- a/boost/fusion/view/transform_view/detail/end_impl.hpp +++ b/boost/fusion/view/transform_view/detail/end_impl.hpp @@ -34,7 +34,7 @@ namespace boost { namespace fusion typedef typename Sequence::transform_type transform_type; typedef transform_view_iterator<last_type, transform_type> type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Sequence& s) { @@ -55,7 +55,7 @@ namespace boost { namespace fusion typedef typename Sequence::transform_type transform_type; typedef transform_view_iterator2<last1_type, last2_type, transform_type> type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Sequence& s) { diff --git a/boost/fusion/view/transform_view/detail/next_impl.hpp b/boost/fusion/view/transform_view/detail/next_impl.hpp index cebba59526..ce22d19edc 100644 --- a/boost/fusion/view/transform_view/detail/next_impl.hpp +++ b/boost/fusion/view/transform_view/detail/next_impl.hpp @@ -38,7 +38,7 @@ namespace boost { namespace fusion typedef typename Iterator::transform_type transform_type; typedef transform_view_iterator<next_type, transform_type> type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& i) { @@ -61,7 +61,7 @@ namespace boost { namespace fusion typedef typename Iterator::transform_type transform_type; typedef transform_view_iterator2<next1_type, next2_type, transform_type> type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& i) { diff --git a/boost/fusion/view/transform_view/detail/prior_impl.hpp b/boost/fusion/view/transform_view/detail/prior_impl.hpp index 19c802c622..ed6d742eef 100644 --- a/boost/fusion/view/transform_view/detail/prior_impl.hpp +++ b/boost/fusion/view/transform_view/detail/prior_impl.hpp @@ -39,7 +39,7 @@ namespace boost { namespace fusion typedef typename Iterator::transform_type transform_type; typedef transform_view_iterator<prior_type, transform_type> type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& i) { @@ -62,7 +62,7 @@ namespace boost { namespace fusion typedef typename Iterator::transform_type transform_type; typedef transform_view_iterator2<prior1_type, prior2_type, transform_type> type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& i) { diff --git a/boost/fusion/view/transform_view/transform_view.hpp b/boost/fusion/view/transform_view/transform_view.hpp index d18f49c61c..4a6fc5b18c 100644 --- a/boost/fusion/view/transform_view/transform_view.hpp +++ b/boost/fusion/view/transform_view/transform_view.hpp @@ -56,20 +56,20 @@ namespace boost { namespace fusion typedef Sequence2 sequence2_type; typedef F transform_type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED transform_view(Sequence1& in_seq1, Sequence2& in_seq2, F const& binop) : f(binop) , seq1(in_seq1) , seq2(in_seq2) {} - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED first1_type first1() const { return fusion::begin(seq1); } - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED first2_type first2() const { return fusion::begin(seq2); } - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED last1_type last1() const { return fusion::end(seq1); } - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED last2_type last2() const { return fusion::end(seq2); } transform_type f; @@ -100,15 +100,15 @@ namespace boost { namespace fusion typedef Sequence sequence_type; typedef F transform_type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED transform_view(Sequence& in_seq, F const& in_f) : seq(in_seq) , f(in_f) {} - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED first_type first() const { return fusion::begin(seq); } - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED last_type last() const { return fusion::end(seq); } typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq; transform_type f; diff --git a/boost/fusion/view/transform_view/transform_view_iterator.hpp b/boost/fusion/view/transform_view/transform_view_iterator.hpp index 0762228fca..ab40bd748f 100644 --- a/boost/fusion/view/transform_view/transform_view_iterator.hpp +++ b/boost/fusion/view/transform_view/transform_view_iterator.hpp @@ -35,7 +35,7 @@ namespace boost { namespace fusion typedef typename traits::category_of<first_type>::type category; typedef F transform_type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED transform_view_iterator(First const& in_first, F const& in_f) : first(converter::call(in_first)), f(in_f) {} @@ -62,7 +62,7 @@ namespace boost { namespace fusion typedef typename traits::category_of<first1_type>::type category; typedef F transform_type; - BOOST_FUSION_GPU_ENABLED + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED transform_view_iterator2(First1 const& in_first1, First2 const& in_first2, F const& in_f) : first1(converter1::call(in_first1)), first2(converter2::call(in_first2)), f(in_f) {} @@ -76,5 +76,17 @@ namespace boost { namespace fusion }; }} +#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 +namespace std +{ + template <typename First, typename F> + struct iterator_traits< ::boost::fusion::transform_view_iterator<First, F> > + { }; + template <typename First1, typename First2, typename F> + struct iterator_traits< ::boost::fusion::transform_view_iterator2<First1, First2, F> > + { }; +} +#endif + #endif |