Afficher un message
Vieux 17/10/2007, 12h40   #8
terminator
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: template with integer parameter and special implementation for N=1

On Oct 16, 5:31 pm, "marcomoel...@googlemail.com"
<marcomoel...@googlemail.com> wrote:
> Hi,
>
> > You have to create specialization of the whole class:
> > template <class T>
> > class FinitQue<T, 1>
> > {
> > ...

>
> I tried something like this: but I get following "error: previous
> declaration 'template<class T> class FinitQueFix'....."
>
> how do i this better?
>


I am not sure about the source of your trouble some compilers fall
short when it comes to specialize template classes with multiple
arguments (eg. vs.net 2002).I think you`ll feel better by seperating
parameters:

template<typename type>
class TQue{
template <size_t N>
struct finite{
//etc...
};
//template<>
struct finite<1>{
//etc...
};
};

regards,
FM.

  Réponse avec citation
 
Page generated in 0,04361 seconds with 9 queries