mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-22 00:52:08 +02:00
base_type patch from Eric Niebler
[SVN r26818]
This commit is contained in:
@ -316,6 +316,19 @@ main()
|
||||
assert((*i).m_x == i->foo());
|
||||
}
|
||||
|
||||
// check that base_type is correct
|
||||
{
|
||||
// Test constant iterator idiom
|
||||
typedef ptr_iterator<int> BaseIter;
|
||||
|
||||
test = static_assert_same<BaseIter::base_type,int*>::value;
|
||||
test = static_assert_same<constant_iterator<BaseIter>::base_type,BaseIter>::value;
|
||||
|
||||
typedef modify_traversal<BaseIter, boost::incrementable_traversal_tag> IncrementableIter;
|
||||
|
||||
test = static_assert_same<IncrementableIter::base_type,BaseIter>::value;
|
||||
}
|
||||
|
||||
std::cout << "test successful " << std::endl;
|
||||
(void)test;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user