Why does formattedRead take a non-const ref?

Vladimir Panteleev via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 28 21:29:30 PDT 2014


On Friday, 29 August 2014 at 04:21:54 UTC, Andrew Godfrey wrote:
> The first parameter of formattedRead is a non-const ref. Is 
> there
> a good reason for this?

formattedRead takes an input range as the first parameter, and 
consumes it as it is going through the format string. On exit, 
the range will contain the remainder of the initial range after 
all fields have been read and parsed.


More information about the Digitalmars-d mailing list