On Friday, 1 May 2020 at 21:05:17 UTC, Adam D. Ruppe wrote:
On Friday, 1 May 2020 at 20:28:58 UTC, Jean-Louis Leroy wrote:
Something I have overlooked? Any ideas?
There's an old rule, that I can't find in the spec anymore but
I'm still pretty sure it is there, where taking the address of
a t
On Friday, 1 May 2020 at 20:28:58 UTC, Jean-Louis Leroy wrote:
Something I have overlooked? Any ideas?
There's an old rule, that I can't find in the spec anymore but
I'm still pretty sure it is there, where taking the address of a
template inside a template yields the current instantiation.
On Friday, 1 May 2020 at 20:28:58 UTC, Jean-Louis Leroy wrote:
Is it possible, inside a function template, to create an alias
to the instantiated function? IOW the equivalent of
__FUNCTION__, but yielding an alias?
The closest I came is:
import std.string;
import std.traits;
void foo(T
On Friday, 1 May 2020 at 20:43:05 UTC, Steven Schveighoffer wrote:
On 5/1/20 4:28 PM, Jean-Louis Leroy wrote:
Something I have overlooked? Any ideas?
This trick works. No idea who came up with it:
alias thisFunction = __traits(parent, {});
-Steve
I think I get the idea. Alas it doesn't w
On 5/1/20 4:28 PM, Jean-Louis Leroy wrote:
Something I have overlooked? Any ideas?
This trick works. No idea who came up with it:
alias thisFunction = __traits(parent, {});
-Steve
Is it possible, inside a function template, to create an alias to
the instantiated function? IOW the equivalent of __FUNCTION__,
but yielding an alias?
The closest I came is:
import std.string;
import std.traits;
void foo(T)(lazy T)
{
mixin(
"alias thisFunction = ",
__