summaryrefslogtreecommitdiff
path: root/boost/iterator/is_readable_iterator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/iterator/is_readable_iterator.hpp')
-rw-r--r--boost/iterator/is_readable_iterator.hpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/boost/iterator/is_readable_iterator.hpp b/boost/iterator/is_readable_iterator.hpp
index 3f08b92c0e..5bc2339cec 100644
--- a/boost/iterator/is_readable_iterator.hpp
+++ b/boost/iterator/is_readable_iterator.hpp
@@ -5,12 +5,14 @@
# define IS_READABLE_ITERATOR_DWA2003112_HPP
#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/detail/iterator.hpp>
+#include <boost/type_traits/add_lvalue_reference.hpp>
-#include <boost/type_traits/detail/bool_trait_def.hpp>
#include <boost/iterator/detail/any_conversion_eater.hpp>
// should be the last #include
+#include <boost/type_traits/integral_constant.hpp>
#include <boost/iterator/detail/config_def.hpp>
#ifndef BOOST_NO_IS_CONVERTIBLE
@@ -26,7 +28,7 @@ namespace detail
template <class Value>
struct is_readable_iterator_impl
{
- static char tester(Value&, int);
+ static char tester(typename add_lvalue_reference<Value>::type, int);
static char (& tester(any_conversion_eater, ...) )[2];
template <class It>
@@ -96,10 +98,12 @@ namespace detail
{};
} // namespace detail
-// Define the trait with full mpl lambda capability and various broken
-// compiler workarounds
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(
- is_readable_iterator,T,::boost::iterators::detail::is_readable_iterator_impl2<T>::value)
+template< typename T > struct is_readable_iterator
+: public ::boost::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