On Tuesday, 10 February 2026 at 22:47:12 UTC, monkyyy wrote:
On Tuesday, 10 February 2026 at 21:52:52 UTC, realhet wrote:
On Tuesday, 10 February 2026 at 21:14:29 UTC, monkyyy wrote:
On Tuesday, 10 February 2026 at 20:46:11 UTC, realhet wrote:
Hi,
enum stringofenum(alias T)=(){
string[T] o;
static foreach(t;__traits(allMembers, T)){
o[mixin("T."~t)]=t;
}
return o;
}();
That's it THX! It creates the thing and I can assign that to
anything later.
Now I understood that the trick was to avoid that particular
assocArray overload function which has no clue about my enum type
in CT.