diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-08-02 20:41:55 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-08-02 21:03:09 (GMT) |
commit | d5ace22054203c7989691ae8b3fa4e4784d1b57e (patch) | |
tree | 64d400cdb10644967df183d0f202fcbf8160a773 /3rdParty/Boost/src/boost/filesystem/v3/path.hpp | |
parent | 6f26d9aa86f0909af13b23b1a925b8d492e74154 (diff) | |
download | swift-contrib-d5ace22054203c7989691ae8b3fa4e4784d1b57e.zip swift-contrib-d5ace22054203c7989691ae8b3fa4e4784d1b57e.tar.bz2 |
Add two extra Boost dependencies, upgrade to 1.47.0ks/boost1.47
Diffstat (limited to '3rdParty/Boost/src/boost/filesystem/v3/path.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/filesystem/v3/path.hpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/3rdParty/Boost/src/boost/filesystem/v3/path.hpp b/3rdParty/Boost/src/boost/filesystem/v3/path.hpp index f81b631..de09c6b 100644 --- a/3rdParty/Boost/src/boost/filesystem/v3/path.hpp +++ b/3rdParty/Boost/src/boost/filesystem/v3/path.hpp @@ -125,7 +125,7 @@ namespace filesystem3 path(){} path(const path& p) : m_pathname(p.m_pathname) {} - + template <class Source> path(Source const& source, typename boost::enable_if<path_traits::is_pathable< @@ -134,6 +134,17 @@ namespace filesystem3 path_traits::dispatch(source, m_pathname, codecvt()); } + // Overloads for the operating system API's native character type. Rationale: + // - Avoids use of codecvt() for native value_type strings. This limits the + // impact of locale("") initialization failures on POSIX systems to programs + // that actually depend on locale(""). It further ensures that exceptions thrown + // as a result of such failues occur after main() has started, so can be caught. + // This is a partial resolution of tickets 4688, 5100, and 5289. + // - A slight optimization for a common use case, particularly on POSIX since + // value_type is char and that is the most common useage. + path(const value_type* s) : m_pathname(s) {} + path(const std::basic_string<value_type>& s) : m_pathname(s) {} + template <class Source> path(Source const& source, const codecvt_type& cvt) // see note above explaining why codecvt() default arguments are not used |