This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18738] New: typename not allowed with non-dependent qualified name
- From: "belz at kolumbus dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Nov 2004 13:45:16 -0000
- Subject: [Bug c++/18738] New: typename not allowed with non-dependent qualified name
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
namespace foo {
typedef int my_type;
}
template<typename T>
struct A {
typename foo::my_type bar();
};
$ g++ typename.cpp
typename.cpp:8: error: 'my_type' in namespace 'foo' does not name a type
with
$ g++ -v
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --enable-languages=c++,c --enable-
threads=posix
Thread model: posix
gcc version 4.0.0 20041130 (experimental)
The qualified name does not need to be dependent according to the std03 14.6/5.
This seems to be regression from the versions before new parser.
Mikael
--
Summary: typename not allowed with non-dependent qualified name
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: belz at kolumbus dot fi
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18738