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: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Jun 2011 12:20:23 +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 #17 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2011-06-14 12:20:21 UTC ---
(In reply to comment #16)
> I had another look at this issue. Something I didn't realize at the time is
> that simply adding begin() and end() overloads taking a const _Expr& is not
> going to work in practice for the usages we care about, like the range-based
> for-loop, unless one manages somehow to pass the *same* temporary _Expr to
> both.
[..]
> Maybe we should somehow point out this specific point in LWG 2058?
I think that Gaby has expressed exactly this problem in the discussion around
LWG 2058, therefore I would suggest to add an exclusion sentence to
[valarray.syn] p4 in regard to the begin/end overloads. I don't think that the
library should support more than the most simple use-case in regard to valarray
range support.