forked from boostorg/fusion
Workaround for LWG 2408: SFINAE-friendly std::iterator_traits.
Now available for GCC(libstdc++v3) < 4.5 and MSVC 12.0. It means, there is no ambiguous about calling next/prior/... via ADL.
This commit is contained in:
@ -67,6 +67,15 @@ namespace boost { namespace fusion
|
||||
};
|
||||
}}
|
||||
|
||||
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
|
||||
namespace std
|
||||
{
|
||||
template <typename Category, typename First, typename Last, typename Pred>
|
||||
struct iterator_traits< ::boost::fusion::filter_iterator<Category, First, Last, Pred> >
|
||||
{ };
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -194,6 +194,15 @@ namespace boost { namespace fusion { namespace extension
|
||||
};
|
||||
}}}
|
||||
|
||||
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
|
||||
namespace std
|
||||
{
|
||||
template <typename First, typename Base>
|
||||
struct iterator_traits< ::boost::fusion::flatten_view_iterator<First, Base> >
|
||||
{ };
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -56,6 +56,15 @@ namespace boost { namespace fusion
|
||||
};
|
||||
}}
|
||||
|
||||
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
|
||||
namespace std
|
||||
{
|
||||
template <typename Category, typename First, typename Last, typename Concat>
|
||||
struct iterator_traits< ::boost::fusion::joint_view_iterator<Category, First, Last, Concat> >
|
||||
{ };
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -54,6 +54,15 @@ namespace boost { namespace fusion
|
||||
|
||||
}}
|
||||
|
||||
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
|
||||
namespace std
|
||||
{
|
||||
template <typename Sequence, typename Pos>
|
||||
struct iterator_traits< ::boost::fusion::nview_iterator<Sequence, Pos> >
|
||||
{ };
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -53,5 +53,14 @@ namespace boost { namespace fusion
|
||||
};
|
||||
}}
|
||||
|
||||
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
|
||||
namespace std
|
||||
{
|
||||
template <typename Sequence, typename Pos>
|
||||
struct iterator_traits< ::boost::fusion::repetitive_view_iterator<Sequence, Pos> >
|
||||
{ };
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -54,5 +54,14 @@ namespace boost { namespace fusion
|
||||
};
|
||||
}}
|
||||
|
||||
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
|
||||
namespace std
|
||||
{
|
||||
template <typename First>
|
||||
struct iterator_traits< ::boost::fusion::reverse_view_iterator<First> >
|
||||
{ };
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -50,6 +50,15 @@ namespace boost { namespace fusion
|
||||
};
|
||||
}}
|
||||
|
||||
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
|
||||
namespace std
|
||||
{
|
||||
template <typename SingleView, typename Pos>
|
||||
struct iterator_traits< ::boost::fusion::single_view_iterator<SingleView, Pos> >
|
||||
{ };
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
@ -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
|
||||
|
||||
|
@ -46,4 +46,13 @@ namespace boost { namespace fusion {
|
||||
};
|
||||
}}
|
||||
|
||||
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
|
||||
namespace std
|
||||
{
|
||||
template <typename IteratorSequence, typename Traversal>
|
||||
struct iterator_traits< ::boost::fusion::zip_view_iterator<IteratorSequence, Traversal> >
|
||||
{ };
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user