Fixes for concept checking; use destructors for checking classes, misc cleanup.

[SVN r33862]
This commit is contained in:
Dave Abrahams
2006-04-29 20:27:14 +00:00
parent 28dd458088
commit f5b644e765
2 changed files with 171 additions and 182 deletions
@@ -6,13 +6,12 @@
# include <boost/iterator/iterator_categories.hpp>
# include <boost/static_assert.hpp>
# include <boost/mpl/or.hpp> // used in iterator_tag inheritance logic
# include <boost/mpl/and.hpp>
# include <boost/mpl/if.hpp>
# include <boost/mpl/eval_if.hpp>
# include <boost/mpl/identity.hpp>
# include <boost/mpl/assert.hpp>
# include <boost/type_traits/is_same.hpp>
# include <boost/type_traits/is_const.hpp>
@@ -151,17 +150,17 @@ struct iterator_category_with_traversal
// Make sure this isn't used to build any categories where
// convertibility to Traversal is redundant. Should just use the
// Category element in that case.
BOOST_STATIC_ASSERT(
!(is_convertible<
BOOST_MPL_ASSERT_NOT((
is_convertible<
typename iterator_category_to_traversal<Category>::type
, Traversal
>::value));
>));
BOOST_STATIC_ASSERT(is_iterator_category<Category>::value);
BOOST_STATIC_ASSERT(!is_iterator_category<Traversal>::value);
BOOST_STATIC_ASSERT(!is_iterator_traversal<Category>::value);
BOOST_MPL_ASSERT((is_iterator_category<Category>));
BOOST_MPL_ASSERT_NOT((is_iterator_category<Traversal>));
BOOST_MPL_ASSERT_NOT((is_iterator_traversal<Category>));
# if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
BOOST_STATIC_ASSERT(is_iterator_traversal<Traversal>::value);
BOOST_MPL_ASSERT((is_iterator_traversal<Traversal>));
# endif
# endif
};
@@ -172,7 +171,7 @@ template <class Traversal, class ValueParam, class Reference>
struct facade_iterator_category_impl
{
# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
BOOST_STATIC_ASSERT(!is_iterator_category<Traversal>::value);
BOOST_MPL_ASSERT_NOT((is_iterator_category<Traversal>));
# endif
typedef typename iterator_facade_default_category<