Boost logo

Boost :

Subject: [boost] [filesystem.v3] v1.49 Path constructor issue in VS Debug configuration
From: Fraser Hutchison (fraser.hutchison_at_[hidden])
Date: 2012-03-11 06:46:36


The changes made to filesystem/v3/src/path.cpp between v1.48 and v1.49
seem to be causing a crash if I initialise a path as e.g. a global
variable or as a static class member, but only for a Debug build. (I'm
using VS10 on 64-bit Win 7). The following program exhibits this behaviour:

|#include "boost/filesystem/v3/path.hpp"
boost::filesystem::path p("p");
int main() { return 0; }
In Debug, I can see that the third path constructor calls |codecvt()|,
which calls |wchar_t_codecvt_facet()|, which returns |codecvt_facet|.
However, |codecvt_facet| hasn't been initialised at this point. This
appears to only be the case for Debug builds though.

I'm unclear as to whether this is an MSVC bug though. I thought that
the Standard required |codecvt_facet| to have been initialised before
|wchar_t_codecvt_facet()| since it comes earlier in the same translation

Could someone please clarify whether I should file a bug report with
boost please?



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