/*============================================================================= 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) ==============================================================================*/ #ifndef FUSION_TRANSFORM_VIEW_ITERATOR_07162005_1033 #define FUSION_TRANSFORM_VIEW_ITERATOR_07162005_1033 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef _MSC_VER # pragma warning(push) # pragma warning(disable: 4512) // assignment operator could not be generated. #endif namespace boost { namespace fusion { // Unary Version struct transform_view_iterator_tag; template struct transform_view_iterator : iterator_base > { typedef transform_view_iterator_tag fusion_tag; typedef convert_iterator converter; typedef typename converter::type first_type; typedef typename traits::category_of::type category; typedef F transform_type; 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) {} first_type first; transform_type f; }; // Binary Version struct transform_view_iterator2_tag; template struct transform_view_iterator2 : iterator_base > { typedef transform_view_iterator2_tag fusion_tag; typedef convert_iterator converter1; typedef convert_iterator converter2; typedef typename converter1::type first1_type; typedef typename converter2::type first2_type; typedef typename traits::category_of::type category; typedef F transform_type; 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) {} first1_type first1; first2_type first2; transform_type f; }; }} #ifdef _MSC_VER # pragma warning(pop) #endif #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { template struct iterator_traits< ::boost::fusion::transform_view_iterator > { }; template struct iterator_traits< ::boost::fusion::transform_view_iterator2 > { }; } #endif #endif