From f0248daa1eda942d547cb0f7a9566de9b2c42782 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Sun, 4 Jan 2004 04:27:43 +0000 Subject: [PATCH] a few edits [SVN r21470] --- test/indirect_iterator_member_types.cpp | 54 ++++++++++++------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/test/indirect_iterator_member_types.cpp b/test/indirect_iterator_member_types.cpp index ffc15be..8e8fd01 100644 --- a/test/indirect_iterator_member_types.cpp +++ b/test/indirect_iterator_member_types.cpp @@ -16,19 +16,20 @@ #include #include +struct incomplete; struct none { }; -void blah(none) { } +void see_type(none) { } struct zow { }; struct my_ptr1 { - typedef const volatile zow element_type; + typedef const zow element_type; }; struct my_ptr2 { }; namespace boost { template <> struct referent { - typedef const volatile zow type; + typedef const zow type; }; } @@ -41,7 +42,7 @@ int main() /* Category = */ boost::use_default, /* Reference = */ boost::use_default, /* Difference = */ boost::use_default> Iter; - + BOOST_STATIC_ASSERT((boost::is_same::value)); BOOST_STATIC_ASSERT((boost::is_same::value)); BOOST_STATIC_ASSERT((boost::is_same::value)); @@ -59,10 +60,10 @@ int main() /* Category = */ boost::use_default, /* Reference = */ boost::use_default, /* Difference = */ boost::use_default> Iter; - + BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); BOOST_STATIC_ASSERT((boost::is_same::value)); BOOST_STATIC_ASSERT((boost::is_convertible::type, boost::random_access_traversal_tag>::value)); } -#if 0 - // This is a bug. { typedef boost::indirect_iterator< my_ptr2*, @@ -81,32 +80,31 @@ int main() /* Difference = */ boost::use_default> Iter; BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - - BOOST_STATIC_ASSERT((boost::is_convertible::value)); - BOOST_STATIC_ASSERT((boost::is_convertible::type, - boost::random_access_traversal_tag>::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); } -#endif { typedef boost::indirect_iterator< int**, - const volatile int, + int, /* Category = */ boost::use_default, /* Reference = */ boost::use_default, /* Difference = */ boost::use_default> Iter; - BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - BOOST_STATIC_ASSERT((boost::is_same::value)); - - BOOST_STATIC_ASSERT((boost::is_convertible::value)); - BOOST_STATIC_ASSERT((boost::is_convertible::type, - boost::random_access_traversal_tag>::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + } + { + typedef boost::indirect_iterator< + int**, + const int, + /* Category = */ boost::use_default, + /* Reference = */ boost::use_default, + /* Difference = */ boost::use_default> Iter; + + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); } }