explicit instantiation of methods bug.
Andrew Fitzgibbon
awf@robots.ox.ac.uk
Fri Apr 3 21:52:00 GMT 1998
Hi,
I occasionally explicitly instantiate single methods of a template class,
e.g. Given
template<class Type>
struct A {
....
bool f (A<Type>& u, A<Type>& w, A<Type>& v) const { }
};
template bool A<double>::f (A< double >&, A< double >&, A< double >&) const;
I want to instantiate f and not anything else in A.
egcs gives
/users33/awf/etest.cc:7: no matching template for `A<double>::f(A<double> &, A<double> &, A<double> &) const' found
But CD2 (the latest std I have access to), section 14.7.2.8 contains the phrase
and the template may be a [member template or]
member function [which would not normally be accessible]
which would seem to imply that it ought ot be allowed, as in earlier gcc's.
More information about the Gcc
mailing list