Boost logo

Boost Users :

Subject: Re: [Boost-users] A forward iterator need not be default-constructible
From: Krzysztof Żelechowski (giecrilj_at_[hidden])
Date: 2011-10-03 10:59:14


Dave Abrahams wrote:

>
> on Sun Oct 02 2011, Andrew Sutton <asutton.list-AT-gmail.com> wrote:
>
>> I would take that to mean that singularity is independent of type.
>
> Although many types have singular values with respect to certain
> operations (NULL is singular with respect to pointer dereference),
>
> - Not every type has singular values
> - Some types have multiple singular values
> - In general, one type's singular values are distinct from another
> type's singular values
>
> I don't know what you and Chris mean by "independent of type," but to me
> this sounds like singularity is highly dependent on type.

It means iterators of the same type can be singular but need not, whereas
all (valid) iterators of the same type either must support random access
operations or must not, depending on the type in question.

Of course, the result of subtraction may be undefined, but it will not fail
to compile. If you insist that random access iterators are things you can
universally subtract, it will be a concept that applies to pairs, not to
individual objects.

> I suspect
> this situation is less one of "you're completely wrong" than "you and I
> are understanding the same words in different ways."

Probably :-(

Best regards,
Chris


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net