summaryrefslogtreecommitdiff
path: root/boost/iterator/is_lvalue_iterator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/iterator/is_lvalue_iterator.hpp')
-rw-r--r--boost/iterator/is_lvalue_iterator.hpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/boost/iterator/is_lvalue_iterator.hpp b/boost/iterator/is_lvalue_iterator.hpp
index 20c4f38ad4..e821da9c3c 100644
--- a/boost/iterator/is_lvalue_iterator.hpp
+++ b/boost/iterator/is_lvalue_iterator.hpp
@@ -9,10 +9,13 @@
#include <boost/detail/workaround.hpp>
#include <boost/detail/iterator.hpp>
+#include <boost/type_traits/add_lvalue_reference.hpp>
#include <boost/iterator/detail/any_conversion_eater.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
// should be the last #includes
-#include <boost/type_traits/detail/bool_trait_def.hpp>
+#include <boost/type_traits/integral_constant.hpp>
#include <boost/iterator/detail/config_def.hpp>
#ifndef BOOST_NO_IS_CONVERTIBLE
@@ -52,7 +55,7 @@ namespace detail
// convertible to Value const&
struct conversion_eater
{
- conversion_eater(Value&);
+ conversion_eater(typename add_lvalue_reference<Value>::type);
};
static char tester(conversion_eater, int);
@@ -134,13 +137,19 @@ namespace detail
{};
} // namespace detail
-// Define the trait with full mpl lambda capability and various broken
-// compiler workarounds
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(
- is_lvalue_iterator,T,::boost::iterators::detail::is_readable_lvalue_iterator_impl<T>::value)
+template< typename T > struct is_lvalue_iterator
+: public ::boost::integral_constant<bool,::boost::iterators::detail::is_readable_lvalue_iterator_impl<T>::value>
+{
+public:
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_lvalue_iterator,(T))
+};
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(
- is_non_const_lvalue_iterator,T,::boost::iterators::detail::is_non_const_lvalue_iterator_impl<T>::value)
+template< typename T > struct is_non_const_lvalue_iterator
+: public ::boost::integral_constant<bool,::boost::iterators::detail::is_non_const_lvalue_iterator_impl<T>::value>
+{
+public:
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_non_const_lvalue_iterator,(T))
+};
} // namespace iterators
@@ -152,6 +161,5 @@ using iterators::is_non_const_lvalue_iterator;
#endif
#include <boost/iterator/detail/config_undef.hpp>
-#include <boost/type_traits/detail/bool_trait_undef.hpp>
#endif // IS_LVALUE_ITERATOR_DWA2003112_HPP