This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77815] access to destructor via decltype-specifier
- 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: Mon, 03 Oct 2016 10:51:54 +0000
- Subject: [Bug c++/77815] access to destructor via decltype-specifier
- Auto-submitted: auto-generated
- References: <bug-77815-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77815
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-10-03
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
That's not a valid testcase, please read https://gcc.gnu.org/bugs/ again.
Confirmed for:
void f()
{
struct T { };
T t;
t.~decltype(t)();
}
As a workaround you can define a new alias and use that in the
pseudo-destructor-name:
using U = decltype(t);
t.~U();