Boost logo

Boost Users :

From: Hicham Mouline (hicham_at_[hidden])
Date: 2008-03-18 13:32:26


hi,

I have a template function <typename cT, typename tT, int n>
{
....
double array[n];

if (n==2)
  binomial code
else if (n==3)
  trinomial code (array[0] array[1] array[2])
else
....

compiler tries to compile the "trinomial code" code even when the template
is instantiated with n=2,
and that gives warnings because of array[2]

Is there a way to make the compiler ignore the non-binomial code ?
rds,


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net