Subject: [Boost-bugs] [Boost C++ Libraries] #9219: path::codecvt() is called when not required
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-10 10:08:06
#9219: path::codecvt() is called when not required
------------------------------+-------------------------
Reporter: andysem | Owner: bemandawes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
Version: Boost 1.54.0 | Severity: Showstopper
Keywords: |
------------------------------+-------------------------
Some path functions (including assignment and constructor) are templated
so that they can be called with arguments other than path. The templated
functions are not supposed to be used when the argument is compatible with
the native path string type. However, the templated functions are called
anyway because the is_pathable trait is overly permissive (it returns true
even for compatible types). This happens because the templated functions
turn out to be more preferable than non-templated ones. For example:
{{{
path p = getcwd(); // calls path::path<char*>(char*) instead of non-
templated path::path(const char*)
}}}
The above example is actually what happens in filesystem::current_path(),
but obviously is not limited by that.
Given the other problems with the global locale (#8642, for example) this
makes Boost.Filesystem unusable for Boost.Log because there is no way to
use it without requiring codecvt() to be called at some point.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9219> 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:14 UTC