
Hi,
I have a function makeTree whose behavior depends on 3 different policies
typename T1
typename T2
int N
For performance reasons, I need to write the 2- and 3- specializations
alongside the general N case. That is, the 2- and 3- default
instantiations generated from the N case by the compiler are not optimal.
As it is impossible to write function templates partial specializations, I
encapsulate the
template< typename T1, typename T2, int N> void makeTree(Head<N>&, const
T2&, const C&) ;
function in a class template
template< typename T1, typename T2, int N> class makeTree{
void makeTree(Head<N>&, const T2&, const C&);
};
and write the partial specializations
participants (1)
-
Hicham Mouline