Re: [Boost-bugs] [Boost C++ Libraries] #6638: convert_aux fails while intializing global variable

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6638: convert_aux fails while intializing global variable
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-11 14:06:10


#6638: convert_aux fails while intializing global variable
---------------------------------+------------------------------------------
  Reporter: john doe <johndoe> | Owner: bemandawes
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: filesystem
   Version: Boost 1.49.0 | Severity: Problem
Resolution: | Keywords: filesystem path convert wide/narrow string
---------------------------------+------------------------------------------

Comment (by Fraser Hutchison <fraser.hutchison@…>):

 It appears to be down to an MSVC bug.

 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.

 I believe the Standard requires {{{codecvt_facet}}} to have been
 initialised before {{{wchar_t_codecvt_facet()}}} since it comes earlier in
 the same translation unit, hence I think this is an MSVC bug.

 I can confirm that there is no problem with this in 1.48.0 - it's moving
 {{{codecvt_facet}}} from being a static member to a variable in unnamed
 namespace in 1.49.0 that has caused the issue.

 The following slightly simpler program gives the error also:
 {{{
 #include "boost/filesystem/v3/path.hpp"
 boost::filesystem::path p("p");
 int main() { return 0; }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6638#comment:2>
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:09 UTC