Boost logo

Boost Users :

From: Sachin Garg (schngrg_at_[hidden])
Date: 2008-08-27 16:47:09


On Thu, Aug 28, 2008 at 2:04 AM, Sachin Garg <schngrg_at_[hidden]> wrote:
> I want to open a read only file in ios::in mode using fstream but its
> open forces in+out mode, causing my open to fail when it could have
> succeeded.
>
> In boost::filesystem::fstream::open, the file open mode is modified to
> mode | std::ios_base::in | std::ios_base::out
>
> Is this really necessary or can this be changed in future? Atleast
> with MSVC 9.0, std::fstream isn't forcing such behavior.

(Self replying) Maybe it should just use in+out as default parameters
when user doesn't specifies any mode, instead of always modifying a
user specified mode.

SG


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net