[Issue 20117] std.typecons.Typedef has opCmp when base type does not
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 9 07:51:39 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20117
--- Comment #2 from Simen Kjaeraas <simen.kjaras at gmail.com> ---
Alternatively, Typedef should contain only a single member and use aliases for
the rest. Something like this:
struct Typedef(T, T init = T.init, string cookie=null) {
// Renaming the current Typedef:
TypedefImpl!(T, init, cookie) _payload;
alias _payload this;
static foreach (e; __traits(allMembers, T))
mixin("alias "~e~" = _payload."~e~";");
}
--
More information about the Digitalmars-d-bugs
mailing list