471,850 Members | 988 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,850 software developers and data experts.

List Parameters


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?

Oct 21 '06 #1
0 840

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by ritchie | last post: by
5 posts views Thread by Vigneshwar Pilli via DotNetMonster.com | last post: by
5 posts views Thread by tshad | last post: by
reply views Thread by Atos | last post: by
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.