[Bug c++/25548] New: Rejects dependent deconstructor on a non depdendent name (for basic types) too late
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Dec 23 16:01:00 GMT 2005
Testcase:
class Foo {};
struct Bing
{
char *GetChar();
};
template<typename T> struct Bar
{
void Wibble()
{
bing.GetChar()->~T(); // How can this be legal if T isn't char?
}
Bing bing;
};
-----
If we change the return type of GetChar() to Foo * (from char*), we get an
error:
t.cc: In member function Âvoid Bar<T>::Wibble()Â:
t.cc:12: error: the type being destroyed is ÂFooÂ, but the destructor refers to
ÂTÂ
--
Summary: Rejects dependent deconstructor on a non depdendent name
(for basic types) too late
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25548
More information about the Gcc-bugs
mailing list