Removed support for ancient complilers for MPL lambdas in is_readable_iterator.

This commit is contained in:
Andrey Semashev 2025-01-26 17:58:48 +03:00
parent bcf94f9e5d
commit 4fc0165034

View File

@ -2,9 +2,7 @@
// subject to the Boost Software License, Version 1.0. (See accompanying // subject to 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) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef IS_READABLE_ITERATOR_DWA2003112_HPP #ifndef IS_READABLE_ITERATOR_DWA2003112_HPP
# define IS_READABLE_ITERATOR_DWA2003112_HPP #define IS_READABLE_ITERATOR_DWA2003112_HPP
#include <boost/mpl/aux_/lambda_support.hpp>
#include <iterator> #include <iterator>
#include <type_traits> #include <type_traits>
@ -21,10 +19,11 @@ namespace detail
struct is_readable_iterator_impl struct is_readable_iterator_impl
{ {
template <class It> template <class It>
struct rebind : std::is_convertible< struct rebind :
decltype(*std::declval<It&>()) public std::is_convertible<
, typename std::add_lvalue_reference<Value>::type decltype(*std::declval<It&>()),
> typename std::add_lvalue_reference<Value>::type
>
{}; {};
}; };
@ -70,18 +69,17 @@ namespace detail
// an instantiation by removing it for others. // an instantiation by removing it for others.
// //
template <class It> template <class It>
struct is_readable_iterator_impl2 struct is_readable_iterator_impl2 :
: is_readable_iterator_impl< public is_readable_iterator_impl<
BOOST_DEDUCED_TYPENAME std::iterator_traits<It>::value_type const typename std::iterator_traits<It>::value_type const
>::template rebind<It> >::template rebind<It>
{}; {};
} // namespace detail } // namespace detail
template< typename T > struct is_readable_iterator template< typename T >
: public std::integral_constant<bool,::boost::iterators::detail::is_readable_iterator_impl2<T>::value> struct is_readable_iterator :
public std::integral_constant<bool, boost::iterators::detail::is_readable_iterator_impl2<T>::value>
{ {
public:
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_readable_iterator,(T))
}; };
} // namespace iterators } // namespace iterators