This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]