This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53484] [4.7/4.8 Regression] [c++11] Wrong auto in lambdas in function templates
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 25 May 2012 14:49:55 +0000
- Subject: [Bug c++/53484] [4.7/4.8 Regression] [c++11] Wrong auto in lambdas in function templates
- Auto-submitted: auto-generated
- References: <bug-53484-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53484
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Known to work| |4.6.3
Keywords| |rejects-valid, wrong-code
Last reconfirmed| |2012-05-25
CC| |jason at gcc dot gnu.org
Ever Confirmed|0 |1
Summary|[c++11] Wrong auto in |[4.7/4.8 Regression]
|lambdas in function |[c++11] Wrong auto in
|templates |lambdas in function
| |templates
Known to fail| |4.7.0, 4.8.0
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-25 14:49:55 UTC ---
Regression against 4.6.3
Possibly related, the example in [expr.prim.lambda]/18 fails to compile with
4.7 and 4.8
void f3() {
float x, &r = x;
[=] { // x and r are not captured (appearance in a decltype operand is not
an odr-use)
decltype(x) y1; // y1 has type float
decltype((x)) y2 = y1; // y2 has type float const& because this lambda
// is not mutable and x is an lvalue
decltype(r) r1 = y1; // r1 has type float& (transformation not
considered)
decltype((r)) r2 = y2; // r2 has type float const&
};
}