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: [email protected]
Reporter: [email protected]
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.
--