[Issue 20117] New: std.typecons.Typedef has opCmp when base type does not

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 8 16:51:54 UTC 2019


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: nobody at puremagic.com
          Reporter: atila.neves at gmail.com

----------------------------------
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.

--


More information about the Digitalmars-d-bugs mailing list