This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61133] New: g++ doesn't implement DR1760
- From: "ville.voutilainen at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 09 May 2014 20:48:44 +0000
- Subject: [Bug c++/61133] New: g++ doesn't implement DR1760
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61133
Bug ID: 61133
Summary: g++ doesn't implement DR1760
Product: gcc
Version: 4.10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ville.voutilainen at gmail dot com
Testcase:
int main()
{
auto x = [y = 5](){};
auto z = x.y;
}
The member should not be usable. The most recent WP says
"An init-capture behaves as if it declares and explicitly captures a variable
of the form âauto init-capture ;â
whose declarative region is the lambda-expressionâs compound-statement"
and the previous WP said the name of the captured variable should be unique.
See http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1760
I think it was always the intent of captures (including init-captures) that
they do not behave like public members of a class.