This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/48490] New: "delete" with template convertion operator does overload resolution for class operands, but shouldn't.
- From: "flast at flast dot jp" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 7 Apr 2011 12:40:58 +0000
- Subject: [Bug c++/48490] New: "delete" with template convertion operator does overload resolution for class operands, but shouldn't.
- Auto-submitted: auto-generated
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