Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Why "basic_ifstream:: is_open" isn't const?

2008-06-05
2013-05-13
  • Oleh Krasnov
    Oleh Krasnov
    2008-06-05

    Greetings, I use STLport5.2. Recently I have noticed, that the method basic_ifstream:: is_open is marked as not constant.
    It seems to me it is an error because the method code looks as
      bool is_open () {
        return this-> rdbuf ()-> is_open ();
      }
    where basic_filebuf:: is_open () is declared as constant

     
    • > Recently I have noticed, that the method basic_ifstream:: is_open is marked as not
      > constant.

      And this is right. ISO/IEC 2003 (E), 27.8.1.7. Issue was discussed many times, search in inet.

       
    • Well, working draft describe it as const. If you find DR (defect report) status about this issue on WG21, it would be nice.