This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/6259] Explicit instantiation of template constructor not allowed
- 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: 23 Dec 2003 08:47:01 -0000
- Subject: [Bug c++/6259] Explicit instantiation of template constructor not allowed
- References: <20020411095602.6259.wolfgang.bangerth@iwr.uni-heidelberg.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-23 08:46 -------
The error message has changed on the mainline and looks better:
tests/pr6259.cc:6: error: `X' is not a template
tests/pr6259.cc:6: error: expected `)'
tests/pr6259.cc:6: error: abstract declarator `X' used as declaration
tests/pr6259.cc:6: error: explicit instantiation of non-template `X $_0'
tests/pr6259.cc:6: error: expected `;'
I know that the follow works as expected:
template <int dim> struct T {};
struct X {
template <int dim> X (T<dim> &) {};
};
template X::X (T<2> &);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6259