This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/49022] [C++0x][DR 2058] std::begin and std::end specialized for std::valarray with some operators are missing.
- From: "gdr at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Jun 2011 14:05:25 +0000
- Subject: [Bug libstdc++/49022] [C++0x][DR 2058] std::begin and std::end specialized for std::valarray with some operators are missing.
- Auto-submitted: auto-generated
- References: <bug-49022-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49022
--- Comment #25 from Gabriel Dos Reis <gdr at gcc dot gnu.org> 2011-06-14 14:01:30 UTC ---
(In reply to comment #23)
> Ok, now I see, it's the operator[] of _BinBase which returns by value, I
> overlooked that.
Yes, "val" in "valarray" stands for "value", e.g. a valarray
is a fundamentally a value, from a conceptual point of view; not an object.
Range-based "for" is fundamentally container-oriented in the
sense that it assumes that the container is an *object* that
resides in memory, and the iteration really visits each cell in
that object. A valarray is a *value*, and each individual
value in that array may be produced by any mean, e.g. surrogates.