Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12987: boost::filesystem::exists crashes
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-04-26 16:31:35
#12987: boost::filesystem::exists crashes
-------------------------------+------------------------
Reporter: Leinad | Owner: bemandawes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
Version: Boost 1.64.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+------------------------
Comment (by Leinad):
Yes that's correct. I think it's a c++11 feature, but we use this already
in path.cpp:
{{{
std::locale& path_locale()
// std::locale("") construction, needed on non-Apple POSIX systems, can
throw
// (if environmental variables LC_MESSAGES or LANG are wrong, for
example), so
// path_locale() provides lazy initialization via a local static to
ensure that any
// exceptions occur after main() starts and so can be caught.
Furthermore,
// path_locale() is only called if path::codecvt() or path::imbue() are
themselves
// actually called, ensuring that an exception will only be thrown if
std::locale("")
// is really needed.
{
// [locale] paragraph 6: Once a facet reference is obtained from a
locale object by
// calling use_facet<>, that reference remains usable, and the results
from member
// functions of it may be cached and re-used, as long as some locale
object refers
// to that facet.
static std::locale loc(default_locale());
#ifdef BOOST_FILESYSTEM_DEBUG
std::cout << "***** path_locale() called" << std::endl;
#endif
return loc;
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12987#comment:5> 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-04-26 16:36:34 UTC