Boost logo

Boost :

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
value? As
> opposed to a reference, which would permit operations on the value
in the
> 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, gregod at, cpdaniel at, john at