alias template parameters - opCall caller! example breaks in Programming in D, page 530

monkyyy crazymonkyyy at gmail.com
Sat Aug 23 14:58:12 UTC 2025


On Saturday, 23 August 2025 at 13:42:52 UTC, Nick Treleaven wrote:
> On Saturday, 23 August 2025 at 13:38:27 UTC, Nick Treleaven 
> wrote:
>> I'm not aware of any template function called `caller` - 
>> perhaps it is defined in the book somewhere?
>
> ```d
> void caller(alias func)() {
>     write("calling: ");
>     func();
> }
> ```
> https://dlang.org/book/templates_more.html#ix_More%20Templates.alias,%20template%20parameter

why is that education material not showing the fundamental 
pattern of `(alias F,T...)(T args)=>F(args)`?


More information about the Digitalmars-d-learn mailing list