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++/40315] template instantiation fails when using const typename



------- Comment #2 from redi at gcc dot gnu dot org  2009-08-26 14:43 -------
IIUC, the top-level const qualifier on "const typename Foo<D>::double3" in the
primary template applies to the type, which is not known during phase 1

At instantiation time, double3 is known to be an array type, so decays to a
pointer, and the parameter type becomes "const double*" _not_ "double* const"

So the explicit instantiation creates a type which does not match the primary
template, so it cannot be a specialisation of it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40315


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