Connecting Tech Pros Worldwide Help | Site Map

List Parameters

user@domain.invalid
Guest
 
Posts: n/a
#1: Oct 22 '06
Hi,

I try this code:

template <typename Tinline
T const& max(T const& a, T const& b)
{
return a<b?b:a;
}

template <typename T, ... listinline
T const& max(T const& a, T const& b, list const& x)
{
return max(a, max(b, x));
}


But it not compile.
I have this message:
"error: expected identifier before '...' token"

I saw this sample in book "c++ templates: the complete guide"
i use wxWidgets with gcc compiler.

Is this code legal? is it compile?
If no how use list parameters in template?

Thunks
Closed Thread