From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-06-13 15:54:22
--- In boost_at_[hidden], Lois Goldthwaite <loisg_at_o...> wrote:
> Isn't the value_type supposed to be something which is passed by
> opposed to a reference, which would permit operations on the value
> container? If I say
> const T t1;
> T t2 = t1;
> isn't that legal?
Well, we're talking about an iterator's value_type, not a container's
value_type, which may be two different things. Anyway, who said the
value_type is supposed to be anything in particular? I don't get any
help from the standard on this, really. The expressions *p and *p++
are supposed to be convertible to the value_type. Also, for output
iterators you're supposed to be able to write *p = t, where t is of
type value_type. When you get to ForwardIterator requirements, you
see that you need to be able to form a referenct to the value_type.
That's about it, though.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk