
23 Feb
2005
23 Feb
'05
10:38 p.m.
"Agoston Bejo" <gusz1@freemail.hu> wrote in message news:cr9kth$s8u$1@sea.gmane.org...
Hi all, I am trying to enable only two version of a function. The caller may choose one
of the two versions by specifying a template parameter. I've got two versions
for the problem, both of them failing the same way. template<unsigned int N, typename T> enable_if_c<N==1> f(T t) { cout << 1 << endl; }
FWIW enable_if signature is required as follows: template<unsigned int N, typename T> //enable_if_c<N==1> typename enable_if_c<N==1>::type f(T t) { cout << 1 << endl; } //...etc regards Andy Little