const-correctness in std.range
Vlad Levenfeld via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Sep 2 22:04:18 PDT 2014
Thanks for the reply.
And indeed, I recently found that ByLine.empty can't be const
because it writes and removes a character from the stream or
something... and when I compile with optimizations, const empty
gets totally wrecked.
I suppose that making empty const doesn't really gain me
anything, as its generally used in conjunction with popFront
which is obviously non-const.
More information about the Digitalmars-d-learn
mailing list