This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49003] [C++0x][DR 1207] decltype in member function's trailing return type should deduce constness of *this
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Jun 2011 21:19:52 +0000
- Subject: [Bug c++/49003] [C++0x][DR 1207] decltype in member function's trailing return type should deduce constness of *this
- Auto-submitted: auto-generated
- References: <bug-49003-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49003
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-06-29 21:19:35 UTC ---
Author: jason
Date: Wed Jun 29 21:19:31 2011
New Revision: 175671
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175671
Log:
DR 1207
PR c++/49003
* cp-tree.h (struct saved_scope): Add x_current_class_ptr,
x_current_class_ref.
(current_class_ptr, current_class_ref): Use them.
* decl.c (build_this_parm): Handle getting the class type.
* parser.c (cp_parser_late_return_type_opt): Set up 'this'
for use within the trailing return type.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/trailing6.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp0x/pr45908.C