From 26240403b0e18fb4d9cc70e9e9248b7407b4ab52 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Thu, 8 Mar 2001 19:04:29 +0000 Subject: [PATCH] added a test to make sure that the type set by the generator is really the type used [SVN r9497] --- iter_traits_gen_test.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/iter_traits_gen_test.cpp b/iter_traits_gen_test.cpp index f031ae0..a53354f 100644 --- a/iter_traits_gen_test.cpp +++ b/iter_traits_gen_test.cpp @@ -9,6 +9,10 @@ #include #include +#include + +class bar { }; +void foo(bar) { } int main() @@ -16,7 +20,6 @@ main() using boost::dummyT; dummyT array[] = { dummyT(0), dummyT(1), dummyT(2), dummyT(3), dummyT(4), dummyT(5) }; - const int N = sizeof(array)/sizeof(dummyT); typedef boost::iterator_adaptor my_iter; my_iter mi(array); @@ -27,6 +30,8 @@ main() ::reference ::iterator_category > iter_type; + BOOST_STATIC_ASSERT((boost::is_same::value)); + iter_type i(mi); boost::input_iterator_test(i, dummyT(0), dummyT(1)); } @@ -40,7 +45,7 @@ main() ::iterator_category ::difference_type > adaptor_type; - adaptor_type i(mi); + adaptor_type i(array); boost::input_iterator_test(i, dummyT(0), dummyT(1)); int zero = 0;