[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 08:21:20 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20117
--- Comment #3 from Atila Neves <atila.neves at gmail.com> ---
But `int` *doesn't* have `opCmp`. I found this by trying to wrap a generic type
for Python and implementing the comparison. std.typecons.Typedef completely
broke things and I have to special-case for it, because `hasMember!(Typedef,
"opCmp")` returns true, but then one can't actually forward to it because it
doesn't actually exist.
Incidentally, the reason the bug happens is because `Typedef` uses `Proxy` in
its implementation, and `Proxy` defines `opCmp`.
--
More information about the Digitalmars-d-bugs
mailing list