iterator_archetypes.hpp, iterator_concepts.hpp -

incrementable_iterator_tag -> incrementable_traversal_tag
   single_pass_iterator_tag -> single_pass_traversal_tag

iterator_categories.hpp -

   added writability stripping to new_category_to_access for iterator

   adaptors based on iterators with new-style tags

   ReturnTag->AccessTag / returns->access

   Fixed a bug which would rule out user-defined access/traversal tags
   - we weren't accounting for tag convertibility without public
   inheritance.

iterator_facade.hpp -

   Workaround for a Borland const-dropping bug.

detail/categories.hpp -

   fixed is_tag so it doesn't rely on inheritance for detection

concept_tests.cpp -

   added new tests, use static_assert_same for better feedback on failure

iterator_adaptor_test.cpp

   workarounds for CWPro7, use static_assert_same for better feedback on failure
   wiped out #if 0 section

unit_tests.cpp -

   factored static_assert_same into a separate file


[SVN r1296]
This commit is contained in:
Dave Abrahams
2003-05-31 02:44:39 +00:00
parent e2b58d1eea
commit 65fe9a13e5
9 changed files with 306 additions and 157 deletions
+6 -6
View File
@@ -164,7 +164,7 @@ namespace boost_concepts {
boost::function_requires<
boost::DefaultConstructibleConcept<Iterator> >();
BOOST_STATIC_ASSERT((boost::detail::is_tag<boost::incrementable_iterator_tag, traversal_category>::value));
BOOST_STATIC_ASSERT((boost::detail::is_tag<boost::incrementable_traversal_tag, traversal_category>::value));
++i;
(void)i++;
@@ -182,7 +182,7 @@ namespace boost_concepts {
boost::function_requires< IncrementableIteratorConcept<Iterator> >();
boost::function_requires< boost::EqualityComparableConcept<Iterator> >();
BOOST_STATIC_ASSERT((boost::detail::is_tag<boost::single_pass_iterator_tag, traversal_category>::value));
BOOST_STATIC_ASSERT((boost::detail::is_tag<boost::single_pass_traversal_tag, traversal_category>::value));
}
};
@@ -254,7 +254,7 @@ namespace detail
struct Operations;
template <>
struct Operations<boost::incrementable_iterator_tag>
struct Operations<boost::incrementable_traversal_tag>
{
template <typename Iterator1, typename Iterator2>
static void constraints(Iterator1 const& i1, Iterator2 const& i2)
@@ -264,12 +264,12 @@ namespace detail
};
template <>
struct Operations<boost::single_pass_iterator_tag>
struct Operations<boost::single_pass_traversal_tag>
{
template <typename Iterator1, typename Iterator2>
static void constraints(Iterator1 const& i1, Iterator2 const& i2)
{
Operations<boost::incrementable_iterator_tag>(i1, i2);
Operations<boost::incrementable_traversal_tag>(i1, i2);
i1 == i2;
i1 != i2;
@@ -284,7 +284,7 @@ namespace detail
template <typename Iterator1, typename Iterator2>
static void constraints(Iterator1 const& i1, Iterator2 const& i2)
{
Operations<boost::single_pass_iterator_tag>::constraints(i1, i2);
Operations<boost::single_pass_traversal_tag>::constraints(i1, i2);
}
};