mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-21 16:42:09 +02:00
Added traversal_category and access_category specializations for MPL lambda support
[SVN r19921]
This commit is contained in:
@ -29,6 +29,9 @@
|
|||||||
#include <boost/mpl/or.hpp>
|
#include <boost/mpl/or.hpp>
|
||||||
#include <boost/mpl/apply.hpp>
|
#include <boost/mpl/apply.hpp>
|
||||||
#include <boost/mpl/aux_/msvc_eti_base.hpp>
|
#include <boost/mpl/aux_/msvc_eti_base.hpp>
|
||||||
|
#ifdef BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
|
||||||
|
# include <boost/mpl/placeholders.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
@ -340,6 +343,29 @@ namespace boost {
|
|||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ifdef BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
|
||||||
|
// Hack because BOOST_MPL_AUX_LAMBDA_SUPPORT doesn't seem to work
|
||||||
|
// out well. Instantiating the nested apply template also
|
||||||
|
// requires instantiating iterator_traits on the
|
||||||
|
// placeholder. Instead we just specialize it as a metafunction
|
||||||
|
// class.
|
||||||
|
template <>
|
||||||
|
struct access_category<mpl::_1>
|
||||||
|
{
|
||||||
|
template <class T>
|
||||||
|
struct apply : access_category<T>
|
||||||
|
{};
|
||||||
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct traversal_category<mpl::_1>
|
||||||
|
{
|
||||||
|
template <class T>
|
||||||
|
struct apply : traversal_category<T>
|
||||||
|
{};
|
||||||
|
};
|
||||||
|
# endif
|
||||||
|
|
||||||
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
Reference in New Issue
Block a user