May 15, 2002
Greetings,

It seems that invoking a template function with a default parameter more than
once in a unit causes "redefinition of default parameter" error.
The following code triggers the problem:

template <class T>
void myFunc(int=1);

void main()
{
myFunc<int>();
myFunc<int>();
}

Dimitri Kaparis,
Independent Developer
http://www.universalstudyhelper.com - software to help you study any subject.
May 15, 2002
Thanks for reporting this. -Walter

"Dimitri Kaparis" <dkaparis@universalstudyhelper.com> wrote in message news:abu60i$864$1@digitaldaemon.com...
> Greetings,
>
> It seems that invoking a template function with a default parameter more
than
> once in a unit causes "redefinition of default parameter" error. The following code triggers the problem:
>
> template <class T>
> void myFunc(int=1);
>
> void main()
> {
> myFunc<int>();
> myFunc<int>();
> }
>
> Dimitri Kaparis,
> Independent Developer
> http://www.universalstudyhelper.com - software to help you study any
subject.