mirror of
https://github.com/boostorg/utility.git
synced 2025-08-01 05:44:37 +02:00
removed less() function from policies
policies now operate on whole adaptors rather than Base types [SVN r11377]
This commit is contained in:
@@ -111,7 +111,8 @@ main()
|
|||||||
// implementation match up.
|
// implementation match up.
|
||||||
boost::function_requires<
|
boost::function_requires<
|
||||||
boost::RandomAccessIteratorPoliciesConcept<
|
boost::RandomAccessIteratorPoliciesConcept<
|
||||||
boost::default_iterator_policies, int*,
|
boost::default_iterator_policies,
|
||||||
|
boost::iterator_adaptor<int*, boost::default_iterator_policies>,
|
||||||
boost::iterator<std::random_access_iterator_tag, int, std::ptrdiff_t,
|
boost::iterator<std::random_access_iterator_tag, int, std::ptrdiff_t,
|
||||||
int*, int&>
|
int*, int&>
|
||||||
> >();
|
> >();
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
// See http://www.boost.org for most recent version including documentation.
|
// See http://www.boost.org for most recent version including documentation.
|
||||||
|
|
||||||
// Revision History
|
// Revision History
|
||||||
|
// 12 Oct 2001 Put static asserts in functions for MWERSK (Dave Abrahams)
|
||||||
// 04 Mar 2001 Patches for Intel C++ (Dave Abrahams)
|
// 04 Mar 2001 Patches for Intel C++ (Dave Abrahams)
|
||||||
// 19 Feb 2001 Take advantage of improved iterator_traits to do more tests
|
// 19 Feb 2001 Take advantage of improved iterator_traits to do more tests
|
||||||
// on MSVC. Reordered some #ifdefs for coherency.
|
// on MSVC. Reordered some #ifdefs for coherency.
|
||||||
@@ -84,35 +85,41 @@ template <class Iterator,
|
|||||||
class value_type, class difference_type, class pointer, class reference, class category>
|
class value_type, class difference_type, class pointer, class reference, class category>
|
||||||
struct non_portable_tests
|
struct non_portable_tests
|
||||||
{
|
{
|
||||||
// Unfortunately, the VC6 standard library doesn't supply these :(
|
non_portable_tests()
|
||||||
BOOST_STATIC_ASSERT((
|
{
|
||||||
boost::is_same<
|
// Unfortunately, the VC6 standard library doesn't supply these :(
|
||||||
typename boost::detail::iterator_traits<Iterator>::pointer,
|
BOOST_STATIC_ASSERT((
|
||||||
pointer
|
boost::is_same<
|
||||||
>::value));
|
typename boost::detail::iterator_traits<Iterator>::pointer,
|
||||||
|
pointer
|
||||||
BOOST_STATIC_ASSERT((
|
>::value));
|
||||||
boost::is_same<
|
|
||||||
typename boost::detail::iterator_traits<Iterator>::reference,
|
BOOST_STATIC_ASSERT((
|
||||||
reference
|
boost::is_same<
|
||||||
>::value));
|
typename boost::detail::iterator_traits<Iterator>::reference,
|
||||||
|
reference
|
||||||
|
>::value));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Iterator,
|
template <class Iterator,
|
||||||
class value_type, class difference_type, class pointer, class reference, class category>
|
class value_type, class difference_type, class pointer, class reference, class category>
|
||||||
struct portable_tests
|
struct portable_tests
|
||||||
{
|
{
|
||||||
BOOST_STATIC_ASSERT((
|
portable_tests()
|
||||||
boost::is_same<
|
{
|
||||||
typename boost::detail::iterator_traits<Iterator>::difference_type,
|
BOOST_STATIC_ASSERT((
|
||||||
difference_type
|
boost::is_same<
|
||||||
>::value));
|
typename boost::detail::iterator_traits<Iterator>::difference_type,
|
||||||
|
difference_type
|
||||||
BOOST_STATIC_ASSERT((
|
>::value));
|
||||||
boost::is_same<
|
|
||||||
typename boost::detail::iterator_traits<Iterator>::iterator_category,
|
BOOST_STATIC_ASSERT((
|
||||||
category
|
boost::is_same<
|
||||||
>::value));
|
typename boost::detail::iterator_traits<Iterator>::iterator_category,
|
||||||
|
category
|
||||||
|
>::value));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Test iterator_traits
|
// Test iterator_traits
|
||||||
@@ -121,11 +128,14 @@ template <class Iterator,
|
|||||||
struct input_iterator_test
|
struct input_iterator_test
|
||||||
: portable_tests<Iterator,value_type,difference_type,pointer,reference,category>
|
: portable_tests<Iterator,value_type,difference_type,pointer,reference,category>
|
||||||
{
|
{
|
||||||
BOOST_STATIC_ASSERT((
|
input_iterator_test()
|
||||||
boost::is_same<
|
{
|
||||||
typename boost::detail::iterator_traits<Iterator>::value_type,
|
BOOST_STATIC_ASSERT((
|
||||||
value_type
|
boost::is_same<
|
||||||
>::value));
|
typename boost::detail::iterator_traits<Iterator>::value_type,
|
||||||
|
value_type
|
||||||
|
>::value));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Iterator,
|
template <class Iterator,
|
||||||
|
Reference in New Issue
Block a user