c++/2050: Compiler incorrectly complains about instantiation of template declaration with operator

mathijs@scientist.com mathijs@scientist.com
Wed Feb 21 03:36:00 GMT 2001


>Number:         2050
>Category:       c++
>Synopsis:       Compiler  incorrectly complains about instantiation of template declaration with operator
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 21 03:36:02 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Mathijs de Weerdt
>Release:        2.95.2.1
>Organization:
>Environment:
SuSe Linux
>Description:
The following correct code:

class Test {};
template <class U> int operator++( U i ) {
        return 2; }
template int operator++ <Test>( Test );

returns the following compiler error:

template-id `operator ++<Test>' for `operator ++(Test)' does not match any template declaration
>How-To-Repeat:
compile the 4 lines given code
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list