File.lockingBinaryWriter is not output range?
Denis Feklushkin
feklushkin.denis at gmail.com
Tue Mar 19 13:14:52 UTC 2019
/+ dub.sdl:
name "hello_world"
+/
import std.algorithm, std.range, std.stdio;
void main()
{
// lockingBinaryWriter: Returns an output range that locks
the file and allows fast writing to it.
//
https://dlang.org/library/std/stdio/file.locking_binary_writer.html
stdout.lockingBinaryWriter.put(cast(byte) 123); // works
// But this assert is false:
static
assert(isOutputRange!(typeof(stdout.lockingBinaryWriter), byte));
}
This blocks to user File as Stream for msgpack-d.
More information about the Digitalmars-d-learn
mailing list