variadic templates :: unpacking template arguments

A

alexander.svk

If in functions this is possible to unpack the traiing parameter at first, why it's not in classes.
 
S

SG

If in functions this is possible to unpack the traiing parameter
at first, why it's not in classes.

Please try again asking a question that can be answered without having
to read your mind. Thanks.
 
A

alexander.svk

вторник, 28 Ð¼Ð°Ñ 2013 г., 13:53:26 UTC+2 пользователь SG напиÑал:
Please try again asking a question that can be answered without having

to read your mind. Thanks.

There're 2 types of contexts for templates. If the context is a class/struct, namely
'...template<typename R, typename ... Args>
struct FunctorImpl<R (Args ...)>...', then the parameteres may be expanded starting from the 'head'. If the context is a function, there's no such restriction.
 
V

Victor Bazarov

вторник, 28 Ð¼Ð°Ñ 2013 г., 13:53:26 UTC+2 пользователь SG напиÑал:

There're 2 types of contexts for templates. If the context is a class/struct, namely
'...template<typename R, typename ... Args>
struct FunctorImpl<R (Args ...)>...', then the parameteres may be expanded starting from the 'head'. If the context is a function, there's no such restriction.

"Such" restriction? Which restriction is that?

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top