On 25-ott-10, at 18:04, Steven Schveighoffer wrote:
On Sun, 24 Oct 2010 00:06:23 -0400, Austin Hastings > wrote:
Howdy,
This is a bit involved, so bear with me.
Suppose I have a template, Decider(Args...) and some other
templates, Option1(...), Option2(...), etc.
The job of Decider() is
On Monday, October 25, 2010 06:08:24 Austin Hastings wrote:
> On 10/24/2010 5:16 AM, Simen kjaeraas wrote:
> > Austin Hastings wrote:
> >> If Decider uses Option1.sizeof, does any Option1 code get emitted?
> >
> > For sizeof to be known, the template would have to be instantiated, yes.
>
> Insta
On Sun, 24 Oct 2010 00:06:23 -0400, Austin Hastings
wrote:
Howdy,
This is a bit involved, so bear with me.
Suppose I have a template, Decider(Args...) and some other templates,
Option1(...), Option2(...), etc.
The job of Decider() is to decide, based on the given parameters, which
of
On 10/24/2010 5:16 AM, Simen kjaeraas wrote:
Austin Hastings wrote:
If Decider uses Option1.sizeof, does any Option1 code get emitted?
For sizeof to be known, the template would have to be instantiated, yes.
Instantiated does not necessarily imply emitting code, I think. (Of
course, this
Austin Hastings wrote:
If Decider uses Option1.sizeof, does any Option1 code get emitted?
For sizeof to be known, the template would have to be instantiated, yes.
If Decider uses some external function that makes use of type aliases in
Option1, (example: Option1() { alias byte value_t; }
Howdy,
This is a bit involved, so bear with me.
Suppose I have a template, Decider(Args...) and some other templates,
Option1(...), Option2(...), etc.
The job of Decider() is to decide, based on the given parameters, which
of the possible OptionN templates to use.
Decider uses "static if"