https://issues.dlang.org/show_bug.cgi?id=20117
Issue ID: 20117
Summary: std.typecons.Typedef has opCmp when base type does not
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
----------------------------------
import std.traits;
import std.typecons;
alias MyInt = Typedef!int;
pragma(msg, hasMember!(int, "opCmp"));
pragma(msg, hasMember!(MyInt, "opCmp"));
----------------------------------
This prints false then true. It doesn't work very well in generic code.
--