mirror of
https://github.com/dlang/phobos.git
synced 2025-05-04 00:54:05 +03:00
11 lines
323 B
Text
11 lines
323 B
Text
Added `std.range.bitwise` to create a bitwise adapter over an integral type range, consuming the range elements bit by bit.
|
|
|
|
`std.range.bitwise` creates a bit by bit adapter over an integral type range.
|
|
-------
|
|
import std.range : bitwise;
|
|
ubyte[] arr = [3, 9];
|
|
auto r = arr.bitwise;
|
|
|
|
r[2] = 1;
|
|
assert(arr[0] == 7);
|
|
-------
|