[Bug c++/48490] New: "delete" with template convertion operator does overload resolution for class operands, but shouldn't.
flast at flast dot jp
gcc-bugzilla@gcc.gnu.org
Thu Apr 7 12:41:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48490
Summary: "delete" with template convertion operator does
overload resolution for class operands, but shouldn't.
Product: gcc
Version: 4.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: flast@flast.jp
GCC accepts following code. But it should be reject.
---- testcase.C ----
struct S
{
template < typename T >
operator T *() { return 0; }
};
int main()
{
S s;
delete s;
}
----
All of following versions accept it.
Ubuntu/Linaro 4.4.4-14ubuntu5
4.5.2
4.5.3 20110217
4.6.0
4.6.1 20110310
4.7.0 20110405
More information about the Gcc-bugs
mailing list