This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11930] New: Cannot define static template struct member
- From: "schnetter at uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Aug 2003 16:07:50 -0000
- Subject: [Bug c++/11930] New: Cannot define static template struct member
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11930
Summary: Cannot define static template struct member
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at uni-tuebingen dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
I cannot define static members of template structs. The code
template<int D>
struct x {
static int a;
};
int x<0>::a;
leads to the error message
tmp.cc:5: error: too few template-parameter-lists
The same code compiles fine with g++ 3.3.1.