This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/6259] Explicit instantiation of template constructor not allowed


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]