This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/10759: Invalid use of typename accepted
- From: bangerth at dealii dot org
- To: gcc-gnats at gcc dot gnu dot org
- Date: 12 May 2003 21:27:07 -0000
- Subject: c++/10759: Invalid use of typename accepted
- Reply-to: bangerth at dealii dot org
>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: