Warning, file /include/boost/fusion/iterator/mpl/convert_iterator.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 
0002 
0003 
0004 
0005 
0006 
0007 #if !defined(FUSION_CONVERT_ITERATOR_05062005_1218)
0008 #define FUSION_CONVERT_ITERATOR_05062005_1218
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/support/is_iterator.hpp>
0012 #include <boost/mpl/if.hpp>
0013 #include <boost/mpl/bool.hpp>
0014 
0015 namespace boost { namespace fusion
0016 {
0017     template <typename Iterator>
0018     struct mpl_iterator; 
0019 
0020     
0021     
0022 
0023     template <typename T>
0024     struct convert_iterator
0025     {
0026         typedef typename
0027             mpl::if_<
0028                 is_fusion_iterator<T>
0029               , T
0030               , mpl_iterator<T>
0031             >::type
0032         type;
0033 
0034         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0035         static T const&
0036         call(T const& x, mpl::true_)
0037         {
0038             return x;
0039         }
0040 
0041         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0042         static mpl_iterator<T>
0043         call(T const& , mpl::false_)
0044         {
0045             return mpl_iterator<T>();
0046         }
0047 
0048         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0049         static typename
0050             mpl::if_<
0051                 is_fusion_iterator<T>
0052               , T const&
0053               , mpl_iterator<T>
0054             >::type
0055         call(T const& x)
0056         {
0057             return call(x, is_fusion_iterator<T>());
0058         }
0059     };
0060 }}
0061 
0062 #endif