[Boost-bugs] [Boost C++ Libraries] #4656: program_options parse_config_file() set iostream failbit even if the parse result is ok

Subject: [Boost-bugs] [Boost C++ Libraries] #4656: program_options parse_config_file() set iostream failbit even if the parse result is ok
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-09-17 15:45:31


#4656: program_options parse_config_file() set iostream failbit even if the parse
result is ok
------------------------------+---------------------------------------------
 Reporter: anonymous | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: program_options
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 program_options::parse_config_file() reads data from an ifstream instance.
 It updates the failbit value of this stream when the file reads are ok.

 Test case is attached :

 $ ./foo [[BR]]
 ios failure: failbit: 1 - badbit: 0[[BR]]
 perror() value : test.cfg: No such file or directory[[BR]]
 $ touch test.cfg[[BR]]
 $ ./foo [[BR]]
 opening test.cfg: failbit: 0 - badbit: 0[[BR]]
 let s call parse_config_file()...[[BR]]
 ios failure: failbit: 1 - badbit: 0[[BR]]
 perror() value : test.cfg: Success[[BR]]

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4656>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC