[Issue 17247] New: std.bitmanip.read should not assume sliceable range is assign-copyable to ubyte[].

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Mar 8 11:12:12 PST 2017


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

          Issue ID: 17247
           Summary: std.bitmanip.read should not assume sliceable range is
                    assign-copyable to ubyte[].
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: hsteoh at quickfur.ath.cx

std.bitmanip.read wrongly assumes that if an input range has elements that are
implicitly convertible to const(ubyte), and it supports slicing operations,
then it is possible to copy range elements to a ubyte[] static array using the
assignment operator.  Obviously this only works if the range is ubyte[] or a
similar built-in type, but it fails horribly for user-defined ubyte ranges that
support slicing.

--


More information about the Digitalmars-d-bugs mailing list