|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r50556 - trunk/boost/filesystem
From: bdawes_at_[hidden]
Date: 2009-01-12 12:02:20
Author: bemandawes
Date: 2009-01-12 12:02:20 EST (Mon, 12 Jan 2009)
New Revision: 50556
URL: http://svn.boost.org/trac/boost/changeset/50556
Log:
Filesystem: add specializations to eliminate warnings, thus fixing #2543
Text files modified:
trunk/boost/filesystem/path.hpp | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
Modified: trunk/boost/filesystem/path.hpp
==============================================================================
--- trunk/boost/filesystem/path.hpp (original)
+++ trunk/boost/filesystem/path.hpp 2009-01-12 12:02:20 EST (Mon, 12 Jan 2009)
@@ -97,8 +97,9 @@
{ BOOST_STATIC_CONSTANT( bool, value = true ); };
# endif
- // these only have to be specialized if Path::string_type::value_type
- // is not convertible from char
+ // These only have to be specialized if Path::string_type::value_type
+ // is not convertible from char, although specializations may eliminate
+ // compiler warnings. See ticket 2543.
template<class Path> struct slash
{ BOOST_STATIC_CONSTANT( char, value = '/' ); };
@@ -108,9 +109,22 @@
template<class Path> struct colon
{ BOOST_STATIC_CONSTANT( char, value = ':' ); };
+# ifndef BOOST_FILESYSTEM_NARROW_ONLY
+ template<> struct slash<wpath>
+ { BOOST_STATIC_CONSTANT( wchar_t, value = L'/' ); };
+ template<> struct dot<wpath>
+ { BOOST_STATIC_CONSTANT( wchar_t, value = L'.' ); };
+ template<> struct colon<wpath>
+ { BOOST_STATIC_CONSTANT( wchar_t, value = L':' ); };
+# endif
+
# ifdef BOOST_WINDOWS_PATH
template<class Path> struct path_alt_separator
{ BOOST_STATIC_CONSTANT( char, value = '\\' ); };
+# ifndef BOOST_FILESYSTEM_NARROW_ONLY
+ template<> struct path_alt_separator<wpath>
+ { BOOST_STATIC_CONSTANT( wchar_t, value = L'\\' ); };
+# endif
# endif
// workaround for VC++ 7.0 and earlier issues with nested classes
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk