73. is_open should be const

Section: 31.10 [file.streams] Status: NAD Submitter: Matt Austern Opened: 1998-08-27 Last modified: 2017-06-15 20:26:45 UTC

Priority: Not Prioritized

View all other issues in [file.streams].

View all issues with NAD status.

Discussion:

Classes basic_ifstream, basic_ofstream, and basic_fstream all have a member function is_open. It should be a const member function, since it does nothing but call one of basic_filebuf's const member functions.

Rationale:

Not a defect. This is a deliberate feature; const streams would be meaningless.