Make partial alias of template function
Andrey
saasecondbox at yandex.ru
Tue Apr 23 19:18:25 UTC 2019
Hello,
I want to make partial alias of template function "format":
> void qaz(alias tmp, Values...)()
> {
> alias message = format!tmp;
>
> // ...
>
> enum v = message(Values);
> }
>
> void main()
> {
> qaz!("test %s!", "Qwerty");
> }
But I get this:
> Error: static assert: "Orphan format specifier: %s"
> instantiated from here: format!("test %s!")
Also tried:
> alias message(Args...) = format!(tmp, Args);
The same thing.
How to do it?
More information about the Digitalmars-d-learn
mailing list