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: unassig...@gcc.gnu.org
        ReportedBy: rgue...@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.

Reply via email to