This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19610] default constructor not called for static template member of template class
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jan 2005 20:38:40 -0000
- Subject: [Bug c++/19610] default constructor not called for static template member of template class
- References: <20050124202231.19610.jamesp@trdlnk.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-24 20:38 -------
I think this is invalid because you are just specializing them and nothing else (note the aa2 can be done
the non specialized way too but I showed the specialized way):
// declare space for them
template<typename T> A<T> B<T>::a;
template<typename T> AA<T> B<T>::aa;
//specialize B<char>::aa2
template<> AA<char> B<char>::aa2(1);
//instantiate them
template A<char> B<char>::a;
template AA<char> B<char>::aa;
template AA<char> B<char>::aa2;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19610