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.hpp37
1 files changed, 22 insertions, 15 deletions
diff --git a/boost/iterator/is_lvalue_iterator.hpp b/boost/iterator/is_lvalue_iterator.hpp
index 3beb90df6d..20c4f38ad4 100644
--- a/boost/iterator/is_lvalue_iterator.hpp
+++ b/boost/iterator/is_lvalue_iterator.hpp
@@ -18,7 +18,9 @@
#ifndef BOOST_NO_IS_CONVERTIBLE
namespace boost {
-
+
+namespace iterators {
+
namespace detail
{
#ifndef BOOST_NO_LVALUE_RETURN_DETECTION
@@ -26,20 +28,20 @@ namespace detail
// to the expression's result if <expression> is an lvalue, or
// not_an_lvalue() otherwise.
struct not_an_lvalue {};
-
+
template <class T>
T& lvalue_preserver(T&, int);
-
+
template <class U>
not_an_lvalue lvalue_preserver(U const&, ...);
-
+
# define BOOST_LVALUE_PRESERVER(expr) detail::lvalue_preserver(expr,0)
-
+
#else
-
+
# define BOOST_LVALUE_PRESERVER(expr) expr
-
-#endif
+
+#endif
// Guts of is_lvalue_iterator. Value is the iterator's value_type
// and the result is computed in the nested rebind template.
@@ -55,12 +57,12 @@ namespace detail
static char tester(conversion_eater, int);
static char (& tester(any_conversion_eater, ...) )[2];
-
+
template <class It>
struct rebind
{
static It& x;
-
+
BOOST_STATIC_CONSTANT(
bool
, value = (
@@ -75,7 +77,7 @@ namespace detail
};
#undef BOOST_LVALUE_PRESERVER
-
+
//
// void specializations to handle std input and output iterators
//
@@ -135,11 +137,16 @@ 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::detail::is_readable_lvalue_iterator_impl<T>::value)
-
+ is_lvalue_iterator,T,::boost::iterators::detail::is_readable_lvalue_iterator_impl<T>::value)
+
BOOST_TT_AUX_BOOL_TRAIT_DEF1(
- is_non_const_lvalue_iterator,T,::boost::detail::is_non_const_lvalue_iterator_impl<T>::value)
-
+ is_non_const_lvalue_iterator,T,::boost::iterators::detail::is_non_const_lvalue_iterator_impl<T>::value)
+
+} // namespace iterators
+
+using iterators::is_lvalue_iterator;
+using iterators::is_non_const_lvalue_iterator;
+
} // namespace boost
#endif