forked from boostorg/iterator
Made sure that iterator_facade's nested `::pointer
` type is always
the same as what's returned from operator->. For input iterators, that wasn't always the case (see operator_arrow_proxy). Fixes #1019. [SVN r57989]
This commit is contained in:
6
test/iterator_facade.cpp
Executable file → Normal file
6
test/iterator_facade.cpp
Executable file → Normal file
@ -87,6 +87,10 @@ struct input_iter
|
||||
}
|
||||
};
|
||||
|
||||
template <class T, class U>
|
||||
void same_type(U const&)
|
||||
{ BOOST_MPL_ASSERT((boost::is_same<T,U>)); }
|
||||
|
||||
int main()
|
||||
{
|
||||
int state = 0;
|
||||
@ -101,6 +105,8 @@ int main()
|
||||
input_iter p;
|
||||
(*p).mutator();
|
||||
p->mutator();
|
||||
|
||||
same_type<input_iter::pointer>(p.operator->());
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
Reference in New Issue
Block a user