On Saturday, 30 December 2017 at 23:30:02 UTC, rjframe wrote:
On Sat, 30 Dec 2017 13:07:49 +, Marc wrote:
how do I take a symbol as parameter?
for example:
template nameof(alias S) {
import std.array : split;
enum nameof = S.stringof.split(".")[$-1];
}
Works fine for sa
On Sunday, 31 December 2017 at 22:50:12 UTC, Marc wrote:
On Saturday, 30 December 2017 at 23:30:02 UTC, rjframe wrote:
On Sat, 30 Dec 2017 13:07:49 +, Marc wrote:
how do I take a symbol as parameter?
for example:
[...]
Works fine for say a enum member such nameof!(myEnum.X) but
this:
On Saturday, 30 December 2017 at 23:30:02 UTC, rjframe wrote:
On Sat, 30 Dec 2017 13:07:49 +, Marc wrote:
how do I take a symbol as parameter?
for example:
template nameof(alias S) {
import std.array : split;
enum nameof = S.stringof.split(".")[$-1];
}
Works fine for sa
On Sat, 30 Dec 2017 13:07:49 +, Marc wrote:
> how do I take a symbol as parameter?
>
> for example:
>
>> template nameof(alias S) {
>> import std.array : split;
>> enum nameof = S.stringof.split(".")[$-1];
>>}
>
> Works fine for say a enum member such nameof!(myEnum.X) but this:
>