Re: std.stream.MemoryStream deprecated, range is the alternative?

2015-08-07 Thread anonymous via Digitalmars-d-learn
On Thursday, 6 August 2015 at 17:01:32 UTC, chris wrote: since memorystream is deprecated how do i do something like this with Input and Output ranges? How can i fill up an array with ranges like you can do with streams? Thanks. The InputRange primitives already exist for arrays, they are

std.stream.MemoryStream deprecated, range is the alternative?

2015-08-06 Thread chris via Digitalmars-d-learn
class Test { MemoryStream m_stream; this(MemoryStream stream) { m_stream = stream; } void write(byte val) { m_stream.write(val); } byte read() { byte val; m_stream.read(val); return val; } } void main() { byte[] read =