This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23263] New: Fails to identify member definition
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Aug 2005 20:23:26 -0000
- Subject: [Bug c++/23263] New: Fails to identify member definition
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
template<typename T> struct foo{ static T* p; };
template<typename T> T* foo<T>::p = 0;
template<typename T> struct A {};
template<typename T, template<typename> class C>
struct bar{ static C<void>* p; };
template<typename T> A<void>* bar<T,A>::p = 0;
int main() {
foo<int> f;
bar<int, A> b;
return 0;
}
gets you:
~/ootbc/members/src$ g++ foo.cc
foo.cc:7: error: invalid use of undefined type `struct bar<T, A>'
foo.cc:6: error: declaration of `struct bar<T, A>'
As it works for the plain type case (foo), it looks like something's wrong in
the binding of template template parameters (bar).
Ivan
--
Summary: Fails to identify member definition
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23263