This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
- From: "mmitchel at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Apr 2006 03:06:25 -0000
- Subject: [Bug c++/26266] [4.0/4.1/4.2 regression] Trouble with static const data members in template classes
- References: <bug-26266-6594@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #17 from mmitchel at gcc dot gnu dot org 2006-04-12 03:06 -------
The fix for the bug in Comment #7 is to implement DR224.
The problem here is that we think that A is a dependent type; as such, it might
be int, and the initialization would be valid. However, A is non-dependent
according to DR224. If we recognized that, we would correctly issue an error.
However, implementing DR224 is not trivial. Making types that involve template
parameters non-dependent is likely to trigger problems throughout the front end
in routines that are using "dependent" as a synonym for "uses template
parameters".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26266