April 23, 2019 Make partial alias of template function | ||||
---|---|---|---|---|
| ||||
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? |
Copyright © 1999-2021 by the D Language Foundation