>>>>> "Asger" == Asger K Alstrup Nielsen <[EMAIL PROTECTED]> writes:

Asger> Super!

Asger> You seem to have found it, and has proven yourself worthy of praise ;-)

:-)

Asger> I think the real problem is that operator != is not well
Asger> defined for BufferIterator.  So, the correct (i.e. efficient)
Asger> fix is to do

Asger>  !(i == b.path.end()); ++i) {

No, that doesn't work. I tried it. The problem is that i increments
past b.path.end(), and you segfault in the same place.

Asger> (Unfortunately, BufferIterator::operator< is potentially linear time,
Asger> while operator= is constant time.)

Yes.

Asger> Of course, the better solution is to define the operator!= for
Asger> BufferIterator to avoid this problem in the future.

Yes, that is the best solution.

Asger> Thanks a lot for finding this!

You're welcome.

Asger> Did you read the documentation/code?  Any comments?

Yes.

I like your diagrams. They make everything much clearer.

On the whole, I found the documentation clear and easy to follow.

On the other hand, I think that the whole thing would be even clearer
(and more complete and up to date) if you wrote the code and
documentation together in a literate style. Each documentation chunk
could be followed by the implementation of the class that is being
described.

You can shoot me now, if you want. :-)

                         ---Kayvan
-- 
Kayvan Aghaiepour Sylvan   | Proud husband of       | Father to
Sylvan Associates, Inc.    | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://www.isp.net/~kayvan |                        | Robin Gregory (2/28/92)

Reply via email to