
18 Oct
2005
18 Oct
'05
4:43 p.m.
Hamish Mackenzie <hamish@firestream.co.uk> writes:
On Tue, 2005-10-18 at 10:50 -0300, Fernando Cacciola wrote:
The problems with optional<bool> are totally unrelated to the choice of operators * and ->.
True and I think if you could fix it you would find it much easier to sell me on using * and ->. The issue I have with * and -> is that they do not make it clear that the type in question is supposed to be an optional (to someone reading the code). I still can't think of an example where it is desirable to have X * and optional< Y > use the same interface.
How about indirect_iterator<std::vector<optional<T> >::iterator> ? -- Dave Abrahams Boost Consulting www.boost-consulting.com