[Issue 19412] New: std.algorithm.cmp with default ordering can use memcmp for all unsigned types that are big-endian or have size 1 (instead of just char)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 19 16:33:02 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19412

          Issue ID: 19412
           Summary: std.algorithm.cmp with default ordering can use memcmp
                    for all unsigned types that are big-endian or have
                    size 1 (instead of just char)
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: n8sh.secondary at hotmail.com

Currently memcmp is just used for char[], but it can logically be used for any
unsigned type that either has a size of 1 byte or is big-endian. This applies
only when the default ordering is used.

--


More information about the Digitalmars-d-bugs mailing list