Retrieving call expression of a function

Quentin Ladeveze via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Nov 28 11:45:01 PST 2015


On Saturday, 28 November 2015 at 17:19:40 UTC, tcak wrote:
> On Saturday, 28 November 2015 at 15:41:59 UTC, Quentin Ladeveze 
> wrote:
>> [...]
>
> mixin template could solve this problem as well I guess. It 
> would, instead of calling a function, directly inject the code 
> into where you call it. So, remove the callPrinter function, 
> make template a mixin template, and in main, call it like mixin 
> callPrinter!"...";

I don't think mixin templates would work here. The reference says 
that we can only do declarations in a mixin template.


More information about the Digitalmars-d-learn mailing list