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++/2208: Problem with g++ and templates



>Number:         2208
>Category:       c++
>Synopsis:       Problem with g++ and templates
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 07 10:46:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Benoit Touron
>Release:        gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
UnixWare bdsdev 5 7.1.0 i386 x86at SCO UNIX_SVR5
(result of uname -a)
>Description:
This program does not compile
--> START

template<class BASE_CLASS>
class myclass : public BASE_CLASS
{
public:
  void fun(BASE_CLASS::mytype p)  // GOT " parse error 
                                  //       before `)'"
    { return; }
};
void main()
{
}

<-- END

BASE_CLASS is supposed to have type "mytype"
defined inside it (and public).
This file compiles OK with MS compiler.
>How-To-Repeat:
g++ -c test.cc
>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]