[Bug c++/50961] New: Fails to decay template function properly(?)
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 2 11:32:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50961
Bug #: 50961
Summary: Fails to decay template function properly(?)
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
template < class T > void foo () { }
int bad () {
return !foo < void >;
}
is rejected with
t.C: In function 'int bad()':
t.C:3:13: error: cannot resolve overloaded function 'foo' based on conversion
to type 'bool'
t.C:3:13: error: in argument to unary !
when it should be silently accepted.
More information about the Gcc-bugs
mailing list