This is the mail archive of the gcc-prs@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]
Other format: [Raw text]

c++/10759: Invalid use of typename accepted


>Number:         10759
>Category:       c++
>Synopsis:       Invalid use of typename accepted
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 12 21:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Wolfgang Bangerth
>Release:        unknown-1.0
>Organization:
>Environment:
all versions up to today's CVS
>Description:
I think the use of "typename" in the last line is
bogus, yet it is accepted by all versions of gcc:
-------------------------------------
namespace NS {
  template <typename T> class C;
}

template <typename T> struct X {
    NS::C<T> foo ();
};

template <typename T>
typename NS::C<T> X<T>::foo () {}
----------------------------------

Note that this stops to be accepted once I move C out of
namespace NS, but that shouldn't really matter. Irritatingly,
icc has the same bug, so I found this just by accident...

W.
>How-To-Repeat:

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