[cmake-developers] Weird build error against libc++ on OS X 10.7 (cutting at 1024 characters)
Brad King
brad.king at kitware.com
Tue Jun 24 15:23:32 EDT 2014
On 06/24/2014 03:09 PM, Ben Boeckel wrote:
> The proper way to read lines from a file using iostream is:
>
> std::string line;
> while (std::getline(istr, line)) {
> // use line
> }
If that actually worked on all old stream libraries then we would
not need GetLineFromStream. Also GetLineFromStream has a separate
output argument for indicating whether the line ended in a newline.
> Unfortunately, it looks like there's unavoidable extra logic in there.
> Maybe we could do:
>
> #ifdef BROKEN_STREAMS
> // crutch code
> #else
> // sanity
> #endif
Yes, please try this.
-Brad
More information about the cmake-developers
mailing list