D-Programming-Language/phobos — pull request #1458 by ntrel (2013-08-08 14:17:02+00:00)
Title: Fix Issue 5378 - Make File.byLine accept a string terminator

http://d.puremagic.com/issues/show_bug.cgi?id=5378

Add an overload of `byLine` without a default argument for `terminator`.
Before, `byLine!string` tried to instantiate `string terminator = '\n'`, which is invalid.

This is important to allow passing `"\r\n"` as line terminator for Windows text files.

Before:
```d
auto byLine(Terminator = char, Char = char)
(KeepTerminator keepTerminator = KeepTerminator.no, Terminator terminator = '\n');
```
Proposed:
```d
auto byLine(Terminator = char, Char = char)
(KeepTerminator keepTerminator = KeepTerminator.no);
auto byLine(Terminator, Char = char)
(KeepTerminator keepTerminator, Terminator terminator);
```
This is backward compatible.

Note: I removed the default arguments from `ByLine.this`, but the constructor was never documented anyway (unlike the range primitives).