|
Boost Users : |
Subject: Re: [Boost-users] A forward iterator need not be default-constructible
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-10-02 17:50:33
on Sun Oct 02 2011, Andrew Sutton <asutton.list-AT-gmail.com> wrote:
>>> Also, being a singular iterator is independent of type, while being a
>
>>> random-access iterator is determined by type.
>>
>> No again. Â Objects of this type are not singular iterators:
>>
>> Â struct nonsingular
>> Â {
>> Â Â private:
>> Â Â Â Â void operator=(nonsingular const&);
>> Â };
>>
>> Singular values crop up in all kinds of contexts, BTW. Â Do ints support
>> division? Â Well, yes, unless the denominator is zero.
>
> I'm sorry. This is completely wrong. 0 is value -- a state of an
> numeric type -- just like singularity is the state of some iterators.
Yes. I don't see that as a contradiction.
> In fact, I think you actually prove Chris' point, here; you've just
> extended the notion of singularity from iterators to integers.
It's not like I just did something new, here!
> 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. I suspect
this situation is less one of "you're completely wrong" than "you and I
are understanding the same words in different ways."
Cheers,
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
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