Boost logo

Boost :

From: Arjen Wagenaar (arjenw_at_[hidden])
Date: 2006-03-31 04:44:23

Hi Beman,

> >
> > == openmode differences for path/wpath
> >
> > I ran into a few calls where fs::ofstreams where opened in binary mode,
> > but
> > the std::ios_base::out flag wasn't specified. This worked fine for
> paths,
> > but for wpaths this was giving asserts as the narrow_path() function
> > specifically checks for this flag.
> Good catch. CVS has been changed to OR in the correct flag. The problem
> also
> affected ifstreams and fstreams.

I've just checked with the latest CVS and the test_out_mode_wide() case (see
below) still fails (on windows). The file is not created.

In fstream.hpp(369) a call is made to detail::path_proxy with a mode
parameter without the std::ios_base_out flag. This flag is checked in

--- snip

  template<typename Path>
  void test_no_out_mode(Path const& p)
    fs::ofstream str(p, std::ios_base::binary);

  void test_out_mode_narrow()

  void test_out_mode_wide()

filesystem_unit.cpp(33): error in "filesystem_test::test_out_mode_wide":
heck !!str failed
filesystem_unit.cpp(34): error in "filesystem_test::test_out_mode_wide":
heck fs::exists(p) failed

--- snip



Boost list run by bdawes at, gregod at, cpdaniel at, john at