c++.beta - function template specialization
- Richard Grant <fractal clark.net> Apr 03 2003
- "Walter" <walter digitalmars.com> Apr 05 2003
Congrats.. the getters and setters for tuples are working. However, conditional
expressions - well, looks like a problem with function template specialization.
struct null_type { };
template <class T1, class T2>
int fn(const T1& left, const T2& right) {
return 0;
}
template <>
int fn<null_type,null_type>(const null_type&, const null_type&) {
//Error: 'fn' is not a class template
return 1;
}
int main() { }
Richard
Apr 03 2003
DMC doesn't do explicit specialization for function templates yet. "Richard Grant" <fractal clark.net> wrote in message news:b6hs9p$gd0$1 digitaldaemon.com...Congrats.. the getters and setters for tuples are working. However,
expressions - well, looks like a problem with function template
struct null_type { }; template <class T1, class T2> int fn(const T1& left, const T2& right) { return 0; } template <> int fn<null_type,null_type>(const null_type&, const null_type&) { //Error: 'fn' is not a class template return 1; } int main() { } Richard
Apr 05 2003








"Walter" <walter digitalmars.com>