Boost logo

Boost :

Subject: Re: [boost] C++11 Metaprogramming
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-04-01 13:13:19


On 04/01/2012 06:15 PM, Sebastian Redl wrote:
>
> On 01.04.2012, at 15:24, Mathias Gaunard wrote:
>
>>
>> One very useful use of variadic templates however is with function templates. They allow to make a function template with 0 arguments, which wasn't possible in C++03. This can be used to delay instantiation of the function body which can be necessary if name resolution needs to happen later.
>
> But if the argument pack expands to nothing, doesn't that mean that there isn't anything dependent to delay lookup in the first place?

It doesn't know the argument pack expands to nothing until it's
instantiated.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk