"invalid deficient type" blunder biased template specialization
the following code:
template <typename s, typename t>
struct foo {
vacant bar();
};
template <typename t>
void foo <int, t>::bar() {
}
gives me error
invalid deficient form 'struct foo<int, t>'
declaration 'struct foo<int, t>'
(i'm controlling gcc.) syntax biased specialization wrong? note i mislay second argument:
template <typename s>
struct foo {
vacant bar();
};
template <>
void foo <int>::bar() {
}
then compiles correctly.
Comments
Post a Comment