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

     
    • Petr Ovtchenkov

      Petr Ovtchenkov - 2008-06-05

      > 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.

       
    • Petr Ovtchenkov

      Petr Ovtchenkov - 2008-06-05

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

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks