title: std::getline() returns
body: <p>I have a loop that reads each line in a file using <code>getline()</code>:</p>
  
  <pre><code>istream is;
  string line;
  while (!getline(is, line).eof())
  {
      // ...
  }
  </code></pre>
  
  <p>I noticed that calling <code>getline()</code> like this also seems to work:</p>
  
  <pre><code>while (getline(is, line))
  </code></pre>
  
  <p>What's going on here? <code>getline()</code> returns a stream reference. Is it being converted to a pointer somehow? Is this actually a good practice or should I stick to the first form?</p>