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

I think another alternative would be to use this for counting functionality: http://www.boost.org/libs/iterator/doc/counting_iterator.html and dumb down your function_input_iterator to be a very simple Incrementable. m. -----Original Message----- From: Neal D. Becker [mailto:ndbecker2@verizon.net] Sent: Friday, May 14, 2004 12:01 PM To: boost@lists.boost.org Subject: [boost] Re: [iterator facade] Why is dereference const? David Abrahams wrote:
"Neal D. Becker" <ndbecker2@verizon.net> writes:
Max Khesin wrote:
"Neal D. Becker" <ndbecker2@verizon.net> writes:
Good suggestion! I'll post the modified code if anyone is interested.
Yes pleaze.
Here is the current version:
distance_to doesn't belong here, and you can eliminate the corresponding cnt.
Actually, I like the one based on Vladimir Prus much better than the one I wrote, so here is the current: 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 wrote:
I think another alternative would be to use this for counting functionality: http://www.boost.org/libs/iterator/doc/counting_iterator.html and dumb down your function_input_iterator to be a very simple Incrementable. m.
Any reason to prefer that approach? It looks like the current one (eof_iterator) meets all of my objectives. I'm happy that the interface looks like istream_iterator, which is familiar (end marker signalled via default constructor). It also calls the underlying function exactly the correct number of times, another point in it's favor.
participants (2)
-
Max Khesin
-
Neal D. Becker