Boost logo

Boost :

From: Ed Brey (brey_at_[hidden])
Date: 2000-03-15 14:21:00

From: "Beman Dawes" <beman_at_[hidden]>
> At 08:45 AM 3/15/00 -0600, Ed Brey wrote:
> >[...]
> >I say follow the C++ convention and use \n; i.e. LF only.
> If I understood the discussion on the C++ committee's core reflector
> on the termination issue, the "C++ convention" is simply the
> platform's native line termination.

I wasn't clear enough in stating what I meant by the "C++ convention".
I'm not referring to the rules regarding source files, but rather the
rules regarding streams. When you open a text file input, the C++
library translates the line termination from whatever the native
system uses to \n, which is defined as LF. This single, well-defined
representation of a line termination character is what I meant by the
C++ convention.

Another way to look at it is that it seems only fitting that our line
ending convention correspond to the output of the following filter,
run on the platform on which the source file was created:

int main(int argc, char** argv) {
    std::ifstream in(argv[1]);
    std::ofstream out(argv[2], std::ios::binary);
    out << in.rdbuf();

Boost list run by bdawes at, gregod at, cpdaniel at, john at