Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > variadic templates :: unpacking template arguments

Reply
Thread Tools

variadic templates :: unpacking template arguments

 
 
alexander.svk@gmail.com
Guest
Posts: n/a
 
      05-28-2013

If in functions this is possible to unpack the traiing parameter at first, why it's not in classes.
 
Reply With Quote
 
 
 
 
SG
Guest
Posts: n/a
 
      05-28-2013
On May 28, 10:35*am, (E-Mail Removed) wrote:
> 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.

 
Reply With Quote
 
 
 
 
alexander.svk@gmail.com
Guest
Posts: n/a
 
      05-28-2013
вторник, 28 мая 2013*г., 13:53:26 UTC+2 пользователь SG написал:
> On May 28, 10:35*am, (E-Mail Removed) wrote:
>
> > 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.


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.
 
Reply With Quote
 
Victor Bazarov
Guest
Posts: n/a
 
      05-28-2013
On 5/28/2013 12:25 PM, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> вторник, 28 мая 2013 г., 13:53:26 UTC+2 пользователь SG написал:
>> On May 28, 10:35 am, (E-Mail Removed) wrote:
>>
>>> 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.

>
> 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
--
I do not respond to top-posted replies, please don't ask
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call again a variadic function (... variable number of arguments)with same arguments that its variadic wrapper moreau.steve@gmail.com C Programming 3 12-31-2008 07:13 AM
variadic function calling variadic function goldfita@signalsguru.net C Programming 5 05-03-2006 05:23 PM
Using variadic functions within variadic functions pinkfloydhomer@gmail.com C Programming 2 02-27-2006 05:47 AM
Variadic functions calling variadic functions with the argument list, HLL bit shifts on LE processors Ross A. Finlayson C Programming 19 03-10-2005 03:57 AM
is casting a variadic function to a non-variadic one legal? Colin Walters C Programming 2 02-13-2004 10:55 PM



Advertisments