RE: [boost] Re: [iterator facade] Why is dereference const?

-----Original Message----- From: David Abrahams [mailto:dave@boost-consulting.com]
Actually, I like the one based on Vladimir Prus much better
than the one I
wrote, so here is the current:
I don't love it. Count is overkill; you only need a bool. Also it only works when value_type is default-constructible. There's a reason I suggested optional<value_type>, you know ;-)
But Neal wants the function to be called count times; how would you do this without a count? thanks\max This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.

Max Khesin <MKhesin@liquidnet.com> writes:
-----Original Message----- From: David Abrahams [mailto:dave@boost-consulting.com]
Actually, I like the one based on Vladimir Prus much better
than the one I
wrote, so here is the current:
I don't love it. Count is overkill; you only need a bool. Also it only works when value_type is default-constructible. There's a reason I suggested optional<value_type>, you know ;-)
But Neal wants the function to be called count times; how would you do this without a count?
I guess you wouldn't. But then the name of the iterator is misleadingly general. I'd consider building an external counting adaptor for the purposes of termination (but that's just me).
thanks\max This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
participants (2)
-
David Abrahams
-
Max Khesin