Boost logo

Boost :

From: Steven E. Harris (seharris_at_[hidden])
Date: 2002-07-26 13:03:57


Jeremy Siek <jsiek_at_[hidden]> writes:

> void read(bool& at_end) { assert(in != 0);
> if (*in)
> std::getline(*in, line);
> if (*in)
          ^^^

Shouldn't that sense be inverted, as:

void read(bool& at_end)
{
    assert( in != 0 );
    at_end = !std::getline( *in, line );
}

-- 
Steven E. Harris        :: seharris_at_[hidden]
Raytheon                :: http://www.raytheon.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk