template fct overloading
Stefan Schwarzer
sts@ica1.uni-stuttgart.de
Mon Nov 15 12:27:00 GMT 1999
// I cannot see a problem with the syntax of the following
// fragment; shouldn't one be able to overload template and
// non-template functions in class scopes and be able to declare
// those out of line? From the examples in Sec. 14 of the standard
// my guess is that this is the intended syntax for this purpose.
// as alluded to, the inline definition of the functions IN the class
// body works as expected
template<int N>
struct A {
int f();
template<int M>
int f();
};
template<int N> template<int M>
int A<N>::f(){ return M; }
template<int N>
int A<N>::f(){ return 1; }
More information about the Gcc-bugs
mailing list