mirror of
https://github.com/boostorg/iterator.git
synced 2025-11-18 08:29:36 +01:00
CXX11
This commit is contained in:
committed by
Georgy Guminov
parent
4b40364d6d
commit
054c013bba
@@ -20,13 +20,10 @@
|
||||
// (David Abrahams)
|
||||
|
||||
# include <iterator>
|
||||
# include <boost/static_assert.hpp>
|
||||
# include <type_traits>
|
||||
# include <boost/concept_archetype.hpp> // for detail::dummy_constructor
|
||||
# include <boost/core/ignore_unused.hpp>
|
||||
# include <boost/core/lightweight_test.hpp>
|
||||
# include <boost/type_traits/is_same.hpp>
|
||||
# include <boost/type_traits/is_pointer.hpp>
|
||||
# include <boost/type_traits/is_reference.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
@@ -143,10 +140,9 @@ template <bool is_pointer> struct lvalue_test
|
||||
typedef typename Iterator::reference reference;
|
||||
typedef typename Iterator::value_type value_type;
|
||||
# endif
|
||||
BOOST_STATIC_ASSERT(boost::is_reference<reference>::value);
|
||||
BOOST_STATIC_ASSERT((boost::is_same<reference,value_type&>::value
|
||||
|| boost::is_same<reference,const value_type&>::value
|
||||
));
|
||||
static_assert(std::is_reference<reference>::value, "");
|
||||
static_assert(std::is_same<reference,value_type&>::value
|
||||
|| std::is_same<reference,const value_type&>::value, "");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -180,7 +176,7 @@ void forward_iterator_test(Iterator i, T v1, T v2)
|
||||
|
||||
// borland doesn't allow non-type template parameters
|
||||
# if !defined(BOOST_BORLANDC) || (BOOST_BORLANDC > 0x551)
|
||||
lvalue_test<(boost::is_pointer<Iterator>::value)>::check(i);
|
||||
lvalue_test<std::is_pointer<Iterator>::value>::check(i);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user