title: Why is `is_open()` non-const?
body: <p>I have a function similar to below which is const and needs to check that a file stream is open prior to continuing:</p>
  
  <pre><code>bool MyClass::checkSomeStuff() const
  {
      // Where outputFile_ is a std::ofstream
      if ( ! outputFile_.is_open() )
      {
          throw std::runtime_error( "Output file not open." );
      }
  
      // ... do more stuff
  </code></pre>
  
  <p>However, It seems I can't do this as <code>is_open()</code> is declared as:</p>
  
  <pre><code>bool is_open ( );
  </code></pre>
  
  <p>(i.e. non-const)</p>
  
  <p>To me it seems a bit odd that a function like this - which is clearly a pure accessor - should be non-const. Is there a logic behind it which makes sense?</p>