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:
Dave Abrahams
2009-11-28 05:12:29 +00:00
parent d11c7a3ec4
commit 4c60e26bf8
2 changed files with 18 additions and 12 deletions

6
test/iterator_facade.cpp Executable file → Normal file
View 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();
}