From 4558bd2cb7b7dabaf07a2ab4d5ea20fb875aa837 Mon Sep 17 00:00:00 2001
From: Beman Dawes
Date: Sat, 17 Mar 2012 12:53:25 +0000
Subject: [PATCH] Add class path preferred_separator
[SVN r77357]
---
include/boost/filesystem/v3/path.hpp | 28 +++--
v3/doc/reference.html | 17 +--
v3/doc/release_history.html | 7 +-
v3/doc/src/source.html | 9 +-
v3/doc/src/tr2_snippets.html | 154 ++++++++++++++++++---------
v3/src/path.cpp | 12 +--
v3/test/path_unit_test.cpp | 4 +-
7 files changed, 145 insertions(+), 86 deletions(-)
diff --git a/include/boost/filesystem/v3/path.hpp b/include/boost/filesystem/v3/path.hpp
index c483671..fb8c75a 100644
--- a/include/boost/filesystem/v3/path.hpp
+++ b/include/boost/filesystem/v3/path.hpp
@@ -58,13 +58,16 @@ namespace filesystem3
// value_type is the character type used by the operating system API to
// represent paths.
-# ifdef BOOST_WINDOWS_API
- typedef wchar_t value_type;
-# else
- typedef char value_type;
-# endif
- typedef std::basic_string string_type;
- typedef std::codecvt codecvt_type;
+# ifdef BOOST_WINDOWS_API
+ typedef wchar_t value_type;
+ BOOST_STATIC_CONSTEXPR value_type preferred_separator = L'\\';
+# else
+ typedef char value_type;
+ BOOST_STATIC_CONSTEXPR value_type preferred_separator = '/';
+# endif
+ typedef std::basic_string string_type;
+ typedef std::codecvt codecvt_type;
// ----- character encoding conversions -----
@@ -406,15 +409,10 @@ namespace filesystem3
iterator begin() const;
iterator end() const;
- // ----- static members -----
+ // ----- static member functions -----
- // ----- imbue -----
-
- static std::locale imbue(const std::locale& loc);
-
- // ----- codecvt -----
-
- static const codecvt_type& codecvt()
+ static std::locale imbue(const std::locale& loc);
+ static const codecvt_type& codecvt()
{
return *wchar_t_codecvt_facet();
}
diff --git a/v3/doc/reference.html b/v3/doc/reference.html
index 3ad5135..7d5ff4d 100644
--- a/v3/doc/reference.html
+++ b/v3/doc/reference.html
@@ -20,17 +20,17 @@
*/
body {
- font-family: sans-serif;
- margin: 1em;
- max-width : 8.5in;
- }
+ font-family: sans-serif;
+ margin: 1em;
+ max-width : 8.5in;
+ }
-table { margin: 0.5em; }
+table { margin: 0.5em; }
-pre { background-color:#D7EEFF }
+pre { background-color:#D7EEFF }
-ins { background-color:#A0FFA0 }
-del { background-color:#FFA0A0 }
+ins { background-color:#A0FFA0 }
+del { background-color:#FFA0A0 }
/*** end ***/
@@ -632,6 +632,7 @@ end example]
typedef see below value_type; // char for POSIX, wchar_t for Windows
typedef std::basic_string<value_type> string_type;
typedef std::codecvt<wchar_t, char, std::mbstate_t> codecvt_type;
+ constexpr value_type preferred_separator;
// constructors and destructor
path();
diff --git a/v3/doc/release_history.html b/v3/doc/release_history.html
index daff220..40030f9 100644
--- a/v3/doc/release_history.html
+++ b/v3/doc/release_history.html
@@ -36,6 +36,11 @@
+1.50.0
+
+ - Add constexpr value_type preferred_separator to class path.
+
+
1.49.0
- Fix #3714,
@@ -118,7 +123,7 @@
Revised
-24 January, 2012
+17 March, 2012
© Copyright Beman Dawes, 2011
Use, modification, and distribution are subject to the Boost Software
License, Version 1.0. See
diff --git a/v3/doc/src/source.html b/v3/doc/src/source.html
index 1792332..4a7772e 100644
--- a/v3/doc/src/source.html
+++ b/v3/doc/src/source.html
@@ -23,12 +23,12 @@ $else
Filesystem TR2 Proposal
$def WHAT "Clause"
$def SNIPPET_FILE "tr2_snippets.html"
- $def HEADER "files"
+ $def HEADER "filesystem"
$def NAMESPACE std
- $def SUBNAMESPACE files
- $def NAMESPACE_BEGIN "namespace std { namespace tr2 { namespace files {
+ $def SUBNAMESPACE filesystem
+ $def NAMESPACE_BEGIN "namespace std { namespace tbd { namespace filesystem {
"
- $def NAMESPACE_END "} } } // namespaces std::tr2::files"
+ $def NAMESPACE_END "} } } // namespaces std::tbd::filesystem"
$endif