On Friday, 26 February 2021 at 19:37:34 UTC, Adam D. Ruppe wrote:
On Friday, 26 February 2021 at 19:32:52 UTC, Jack wrote:
I managed to do this with alias parameter in a template:
this is the only way, it needs to be an alias template
Also, can I short this template function somehow to syntax
On Friday, 26 February 2021 at 19:32:52 UTC, Jack wrote:
I managed to do this with alias parameter in a template:
this is the only way, it needs to be an alias template
Also, can I short this template function somehow to syntax
f!(a) omitting the g?
rename g to f. If the function inside the
int a = 10;
f(a); // print "a"
int b = 10;
f(b); // print "b"
I managed to do this with alias parameter in a template:
template f(alias s, string file = __FILE__, size_t line =
__LINE__)
{
import std.exception : enforce;
import std.string : format;
void g()
{
writeln(__t