Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77669 - in trunk: boost/filesystem libs/filesystem/doc libs/filesystem/doc/src libs/filesystem/src libs/filesystem/test
From: bdawes_at_[hidden]
Date: 2012-03-31 11:53:26


Author: bemandawes
Date: 2012-03-31 11:53:24 EDT (Sat, 31 Mar 2012)
New Revision: 77669
URL: http://svn.boost.org/trac/boost/changeset/77669

Log:
Fix #4065, Boost Filesystem lexicographic path comparison inconsistent. The fix included adding path::compare functions, and cleanup and refactoring of the path relational operators code. Some of the code fixed is used by other functions, so some unrelated bugs may also have been fixed.
Text files modified:
   trunk/boost/filesystem/path.hpp | 102 ++--
   trunk/libs/filesystem/doc/reference.html | 815 ++++++++++++---------------------------
   trunk/libs/filesystem/doc/release_history.html | 8
   trunk/libs/filesystem/doc/src/source.html | 820 ++++++++++++---------------------------
   trunk/libs/filesystem/src/path.cpp | 84 ++-
   trunk/libs/filesystem/test/path_test.cpp | 23 +
   6 files changed, 635 insertions(+), 1217 deletions(-)

Modified: trunk/boost/filesystem/path.hpp
==============================================================================
--- trunk/boost/filesystem/path.hpp (original)
+++ trunk/boost/filesystem/path.hpp 2012-03-31 11:53:24 EDT (Sat, 31 Mar 2012)
@@ -368,6 +368,12 @@
 
 # endif
 
+ // ----- compare -----
+
+ int compare(const path& p) const BOOST_NOEXCEPT; // generic, lexicographical
+ int compare(const std::string& s) const { return compare(path(s)); }
+ int compare(const value_type* s) const { return compare(path(s)); }
+
     // ----- decomposition -----
 
     path root_path() const;
@@ -500,6 +506,13 @@
 
   }; // class path
 
+ namespace detail
+ {
+ BOOST_FILESYSTEM_DECL
+ int lex_compare(path::iterator first1, path::iterator last1,
+ path::iterator first2, path::iterator last2);
+ }
+
 # ifndef BOOST_FILESYSTEM_NO_DEPRECATED
   typedef path wpath;
 # endif
@@ -533,9 +546,11 @@
     void decrement() { m_path_iterator_decrement(*this); }
 
     path m_element; // current element
- const path * m_path_ptr; // path being iterated over
- string_type::size_type m_pos; // position of name in
- // m_path_ptr->m_pathname. The
+ const path* m_path_ptr; // path being iterated over
+ string_type::size_type m_pos; // position of m_element in
+ // m_path_ptr->m_pathname.
+ // if m_element is implicit dot, m_pos is the
+ // position of the last separator in the path.
                                          // end() iterator is indicated by
                                          // m_pos == m_path_ptr->m_pathname.size()
   }; // path::iterator
@@ -550,68 +565,38 @@
   // yield paths, so provide a path aware version
   inline bool lexicographical_compare(path::iterator first1, path::iterator last1,
     path::iterator first2, path::iterator last2)
- {
- for (; first1 != last1 && first2 != last2 ; ++first1, ++first2)
- {
- if (first1->native() < first2->native()) return true;
- if (first2->native() < first1->native()) return false;
- }
- return first1 == last1 && first2 != last2;
- }
+ { return detail::lex_compare(first1, last1, first2, last2) < 0; }
   
- inline bool operator<(const path& lhs, const path& rhs)
- {
- return lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
- }
-
- inline bool operator<=(const path& lhs, const path& rhs) { return !(rhs < lhs); }
- inline bool operator> (const path& lhs, const path& rhs) { return rhs < lhs; }
- inline bool operator>=(const path& lhs, const path& rhs) { return !(lhs < rhs); }
-
- // equality operators act as if comparing generic format strings, to achieve the
- // effect of lexicographical_compare element by element compare.
- // operator==() efficiency is a concern; a user reported the original version 2
- // !(lhs < rhs) && !(rhs < lhs) implementation caused a serious performance problem
- // for a map of 10,000 paths.
-
-# ifdef BOOST_WINDOWS_API
- inline bool operator==(const path& lhs, const path::value_type* rhs)
- {
- const path::value_type* l(lhs.c_str());
- while ((*l == *rhs || (*l == L'\\' && *rhs == L'/') || (*l == L'/' && *rhs == L'\\'))
- && *l) { ++l; ++rhs; }
- return *l == *rhs;
- }
- inline bool operator==(const path& lhs, const path& rhs) { return lhs == rhs.c_str(); }
- inline bool operator==(const path& lhs, const path::string_type& rhs) { return lhs == rhs.c_str(); }
- inline bool operator==(const path::string_type& lhs, const path& rhs) { return rhs == lhs.c_str(); }
- inline bool operator==(const path::value_type* lhs, const path& rhs) { return rhs == lhs; }
+ inline bool operator==(const path& lhs, const path& rhs) {return lhs.compare(rhs) == 0;}
+ inline bool operator==(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) == 0;}
+ inline bool operator==(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) == 0;}
+ inline bool operator==(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) == 0;}
+ inline bool operator==(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) == 0;}
+
+ inline bool operator!=(const path& lhs, const path& rhs) {return lhs.compare(rhs) != 0;}
+ inline bool operator!=(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) != 0;}
+ inline bool operator!=(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) != 0;}
+ inline bool operator!=(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) != 0;}
+ inline bool operator!=(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) != 0;}
+
+ // TODO: why do == and != have additional overloads, but the others don't?
+
+ inline bool operator<(const path& lhs, const path& rhs) {return lhs.compare(rhs) < 0;}
+ inline bool operator<=(const path& lhs, const path& rhs) {return !(rhs < lhs);}
+ inline bool operator> (const path& lhs, const path& rhs) {return rhs < lhs;}
+ inline bool operator>=(const path& lhs, const path& rhs) {return !(lhs < rhs);}
 
   inline std::size_t hash_value(const path& x)
   {
+# ifdef BOOST_WINDOWS_API
     std::size_t seed = 0;
     for(const path::value_type* it = x.c_str(); *it; ++it)
       hash_combine(seed, *it == '/' ? L'\\' : *it);
     return seed;
- }
 # else // BOOST_POSIX_API
- inline bool operator==(const path& lhs, const path& rhs) { return lhs.native() == rhs.native(); }
- inline bool operator==(const path& lhs, const path::string_type& rhs) { return lhs.native() == rhs; }
- inline bool operator==(const path& lhs, const path::value_type* rhs) { return lhs.native() == rhs; }
- inline bool operator==(const path::string_type& lhs, const path& rhs) { return lhs == rhs.native(); }
- inline bool operator==(const path::value_type* lhs, const path& rhs) { return lhs == rhs.native(); }
-
- inline std::size_t hash_value(const path& x)
- {
     return hash_range(x.native().begin(), x.native().end());
- }
 # endif
-
- inline bool operator!=(const path& lhs, const path& rhs) { return !(lhs == rhs); }
- inline bool operator!=(const path& lhs, const path::string_type& rhs) { return !(lhs == rhs); }
- inline bool operator!=(const path& lhs, const path::value_type* rhs) { return !(lhs == rhs); }
- inline bool operator!=(const path::string_type& lhs, const path& rhs) { return !(lhs == rhs); }
- inline bool operator!=(const path::value_type* lhs, const path& rhs) { return !(lhs == rhs); }
+ }
 
   inline void swap(path& lhs, path& rhs) { lhs.swap(rhs); }
 
@@ -652,6 +637,15 @@
   BOOST_FILESYSTEM_DECL bool native(const std::string & name);
  
 //--------------------------------------------------------------------------------------//
+// class path inline member implementations //
+//--------------------------------------------------------------------------------------//
+
+ inline int path::compare(const path& p) const BOOST_NOEXCEPT
+ {
+ return detail::lex_compare(begin(), end(), p.begin(), p.end());
+ }
+
+//--------------------------------------------------------------------------------------//
 // class path member template implementation //
 //--------------------------------------------------------------------------------------//
 

Modified: trunk/libs/filesystem/doc/reference.html
==============================================================================
--- trunk/libs/filesystem/doc/reference.html (original)
+++ trunk/libs/filesystem/doc/reference.html 2012-03-31 11:53:24 EDT (Sat, 31 Mar 2012)
@@ -100,6 +100,7 @@
     format observers</a><br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#path-generic-format-observers"><code>path</code> generic
     format observers</a><br>
+&nbsp;&nbsp;&nbsp; path compare<br>
 &nbsp;&nbsp;&nbsp; path decomposition<br>
 &nbsp;&nbsp;&nbsp; path query<br>
 &nbsp;&nbsp;&nbsp;&nbsp;path iterators<br>
@@ -376,11 +377,12 @@
 {
   namespace filesystem
   {
- class path;
+ class path;
 
- void swap(path&amp; lhs, path&amp; rhs);
     bool lexicographical_compare(path::iterator first1, path::iterator last1,
- path::iterator first2, path::iterator last2);
+ path::iterator first2, path::iterator last2);
+
+<pre> void swap(path&amp; lhs, path&amp; rhs);
     std::size_t hash_value(const path&amp; p);
 
     bool operator==(const path&amp; lhs, const path&amp; rhs);
@@ -567,8 +569,7 @@
 } // namespace boost</pre>
 <h2><a name="Error-reporting">Error reporting</a></h2>
 <p>Filesystem library functions often provide two overloads, one that
-throws an exception to report file system errors, and another that sets an
-<code>error_code</code>.</p>
+throws an exception to report file system errors, and another that sets an <code>error_code</code>.</p>
 <blockquote>
 <p>[<i>Note:</i> This supports two common use cases:</p>
 <ul>
@@ -583,9 +584,7 @@
 </ul>
   <p><i>--end note</i>]</p>
 </blockquote>
-<p>Functions <b>not</b> having an argument of type
-<code>system::error_code&amp;</code>
-report errors as follows, unless otherwise specified:</p>
+<p>Functions <b>not</b> having an argument of type <code>system::error_code&amp;</code> report errors as follows, unless otherwise specified:</p>
   <ul>
   <li>When a call by the
   implementation to an operating system or other underlying API results in an
@@ -598,8 +597,7 @@
 &nbsp;</li>
   <li>Destructors throw nothing.</li>
   </ul>
- <p>Functions having an argument of type
-<code>system::error_code&amp;</code> report errors as follows, unless otherwise
+ <p>Functions having an argument of type <code>system::error_code&amp;</code> report errors as follows, unless otherwise
   specified:</p>
 <ul>
   <li>If a call by the
@@ -621,8 +619,7 @@
 pathname is not necessarily valid for the current operating
 system or for a particular file system.</p>
 <blockquote>
-<p>[<i>Example:</i> A long path name on Windows
-is an example of an innocuous appearing path that is not actually valid. <i>--
+<p>[<i>Example:</i> A long path name on Windows is an example of an innocuous appearing path that is not actually valid. <i>--
 end example</i>]</p>
 </blockquote>
 <pre>namespace boost
@@ -704,6 +701,11 @@
         const u16string generic_u16string() const; // ditto
         const u32string generic_u32string() const; // ditto
 
+ // compare
+ int compare(const path&amp; p) const noexcept;
+ int compare(const std::string&amp; s) const;
+ int compare(const value_type* s) const;
+
         // decomposition
         path root_name() const;
         path root_directory() const;
@@ -744,18 +746,15 @@
 
   } // namespace filesystem
 } // namespace boost</pre>
-<p><code><a name="value_type">value_type</a></code> is an implementation-defined
-<code>typedef</code> for the
+<p><code><a name="value_type">value_type</a></code> is an implementation-defined <code>typedef</code> for the
 character type used by the operating system to represent pathnames.</p>
-<p>Member functions described as returning <code>const string</code>, <code>
-const wstring</code>, <code>const u16string</code>, or <code>const u32string</code> are permitted to return <code>const string&amp;</code>, <code>const
+<p>Member functions described as returning <code>const string</code>, <code>const wstring</code>, <code>const u16string</code>, or <code>const u32string</code> are permitted to return <code>const string&amp;</code>, <code>const
 wstring&amp;</code>, <code>const u16string&amp;</code>, or <code>const u32string&amp;</code>,
 respectively.</p>
 <blockquote>
 <p>[<i>Note:</i> This allows implementations to avoid unnecessary copies when no
 conversion is required.
-Return-by-value is specified as
-<code>const</code> to ensure programs won't break if moved to a return-by-reference
+Return-by-value is specified as <code>const</code> to ensure programs won't break if moved to a return-by-reference
 implementation. <i>--
 end note</i>]</p>
 </blockquote>
@@ -819,20 +818,16 @@
 they use the same format
 for both regular file and directory pathnames. <i>--end note</i>]</p>
 
-<p>[<i>Example:</i>
-On OpenVMS, a path
+<p>[<i>Example:</i> On OpenVMS, a path
 constructed from <code>&quot;/cats/jane&quot;</code> would considered a regular file
 path, and have a native format of <code>&quot;[CATS]JANE&quot;</code>, while a
 path constructed from <code>&quot;/cats/jane/&quot;</code> would be considered a
-directory path, and have a native format of <code>&quot;[CATS.JANE]&quot;</code>.
-<i>--end example</i>]</p>
+directory path, and have a native format of <code>&quot;[CATS.JANE]&quot;</code>. <i>--end example</i>]</p>
 
 </blockquote>
 <h4><a name="path-Conversions-to-generic-format"><code>path</code> Conversions
 to generic format</a></h4>
-<p>Generic format observer
-functions return strings formatted according to the
-generic pathname format. The conversion
+<p>Generic format observer functions return strings formatted according to the generic pathname format. The conversion
 from generic to native formats is implementation defined.</p>
 <blockquote>
 <p>[<i>Note:</i> For POSIX, no conversion is performed. For Windows, backslashes are converted to
@@ -841,38 +836,23 @@
 <h4><a name="path-Encoding-conversions"><code>path</code> Encoding conversions</a></h4>
 <p>If the value type of member function arguments that are character sequences
 representing paths is not <code>value_type</code>,
-and no <code>cvt</code> argument is supplied, conversion to <code>value_type</code>
-occurs using an imbued locale. This imbued locale is initialized with a <code>
-codecvt</code> facet appropriate for the operating system.</p>
-<blockquote>
-<p>For Apple OS X implementations, <code>path::value_type</code>
-is <code>char</code>. The default imbued locale provides a UTF-8 <code>codecvt</code>
-facet. [<i>Rationale:</i> &quot;All BSD system functions expect their string
-parameters to be in UTF-8 encoding and nothing else.&quot; See
-<a href="http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/FileEncodings.html">
-Apple docs</a>. <i>-- end rationale</i>]</p>
-<p>For Windows-like implementations, including
-MinGW, <code>path::value_type</code> is <code>
-wchar_t</code>. The default imbued locale provides a <code>codecvt</code> facet
-that invokes Windows <code>MultiByteToWideChar</code> or <code>
-WideCharToMultiByte</code> API with a codepage of <code>CP_THREAD_ACP</code>
-if Windows <code>AreFileApisANSI()</code>is true, otherwise codepage <code>
-CP_OEMCP</code>. [<i>Rationale:</i> this is the current behavior of C and C++
+and no <code>cvt</code> argument is supplied, conversion to <code>value_type</code> occurs using an imbued locale. This imbued locale is initialized with a <code>codecvt</code> facet appropriate for the operating system.</p>
+<blockquote>
+<p>For Apple OS X implementations, <code>path::value_type</code> is <code>char</code>. The default imbued locale provides a UTF-8 <code>codecvt</code> facet. [<i>Rationale:</i> &quot;All BSD system functions expect their string
+parameters to be in UTF-8 encoding and nothing else.&quot; See Apple docs. <i>-- end rationale</i>]</p>
+<p>For Windows-like implementations, including MinGW, <code>path::value_type</code> is <code>wchar_t</code>. The default imbued locale provides a <code>codecvt</code> facet
+that invokes Windows <code>MultiByteToWideChar</code> or <code>WideCharToMultiByte</code> API with a codepage of <code>CP_THREAD_ACP</code> if Windows <code>AreFileApisANSI()</code>is true, otherwise codepage <code>CP_OEMCP</code>. [<i>Rationale:</i> this is the current behavior of C and C++
 programs that perform file operations using narrow character string to identify
 paths. Changing this in the Filesystem library would be too surprising,
 particularly where user input is involved. <i>-- end rationale</i>]</p>
-<p>For all other implementations, including<b> </b>Linux, <code>path::value_type</code>
-is <code>char</code>. The default imbued locale is <code>std::locale(&quot;&quot;)</code>.
+<p>For all other implementations, including<b> </b>Linux, <code>path::value_type</code> is <code>char</code>. The default imbued locale is <code>std::locale(&quot;&quot;)</code>.
 [<i>Rationale:</i> ISO C specifies this as &quot;the locale-specific native
 environment&quot;, while POSIX says it &quot;Specifies an implementation-defined native
 environment.&quot; <i>-- end rationale</i>]</p>
 </blockquote>
 <h3><a name="path-Requirements"><code>path</code> Requirements</a></h3>
-<p>Template parameters named <code><a name="InputIterator">InputIterator</a></code>
-are required meet the
-requirements for a C++ standard library <code>RandomIterator</code>
-compliant iterator. The iterator's value type is required to be <code>char</code>, <code>
- wchar_t</code>, <code>char16_t</code>, or <code>char32_t</code>.</p>
+<p>Template parameters named <code><a name="InputIterator">InputIterator</a></code> are required meet the
+requirements for a C++ standard library <code>RandomIterator</code> compliant iterator. The iterator's value type is required to be <code>char</code>, <code>wchar_t</code>, <code>char16_t</code>, or <code>char32_t</code>.</p>
 <p>Template parameters named <code><a name="Source">Source</a></code> are required to be one of:</p>
 <ul>
   <li>A container with a value type of <code>char</code>, <code>
@@ -936,12 +916,9 @@
   preferred
   directory separator is implementation-defined.</p>
 <blockquote>
- <p align="left">[<i>Note: </i>For POSIX-like implementations, including<b> </b>
- Unix variants, Linux, and Mac OS X, the preferred directory separator is a
+ <p align="left">[<i>Note: </i>For POSIX-like implementations, including<b> </b>Unix variants, Linux, and Mac OS X, the preferred directory separator is a
     single forward slash.</p>
- <p align="left">For Windows-like implementations, including
- Cygwin and
- MinGW, the preferred directory
+ <p align="left">For Windows-like implementations, including Cygwin and MinGW, the preferred directory
     separator is a single backslash.<i>--end note</i>]</p>
       </blockquote>
 <pre>path&amp; operator/=(const path&amp; p);</pre>
@@ -1006,8 +983,7 @@
 <pre>path&amp; <a name="path-remove_filename">remove_filename</a>();</pre>
 <blockquote>
   <p><i>Returns: </i>As if, <code>*this = parent_path();</code></p>
- <p>[<i>Note:</i> This function is needed to efficiently implement <code>
- directory_iterator</code>. It is exposed to allow additional uses. The actual
+ <p>[<i>Note:</i> This function is needed to efficiently implement <code>directory_iterator</code>. It is exposed to allow additional uses. The actual
   implementation may be much more efficient than <code>*this = parent_path()</code>&nbsp; <i>-- end
   note</i>]</p>
 </blockquote>
@@ -1027,16 +1003,12 @@
 </blockquote>
 <pre><code>void <a name="path-swap">swap</a>(path&amp; rhs) noexcept;</code></pre>
 <blockquote>
- <p><i>Effects:</i>
- Swaps the contents of the two paths.</p>
- <p><i>Complexity: </i>
- constant time.</p>
+ <p><i>Effects:</i> Swaps the contents of the two paths.</p>
+ <p><i>Complexity: </i>constant time.</p>
 </blockquote>
 
-<h3> <a name="path-native-format-observers"><code><font size="4">path</font></code>
-native format observers</a></h3>
-<p>The string returned by all native format observers is in the
-native pathname format.</p>
+<h3> <a name="path-native-format-observers"><code><font size="4">path</font></code> native format observers</a></h3>
+<p>The string returned by all native format observers is in the native pathname format.</p>
 <pre>const string_type&amp; <a name="native">native</a>() const noexcept;</pre>
 <blockquote>
 <p><i>Returns:</i> <code>pathname</code>.</p>
@@ -1049,8 +1021,7 @@
 String <a name="string-template">string</a>(const codecvt_type&amp; cvt=codecvt()) const;</pre>
 <blockquote>
   <p><i>Returns:</i> <code>pathname</code>.</p>
-<p><i>Remarks:</i> If <code>string_type</code> is a different type than <code>
-String</code>, conversion is performed by <code>cvt</code>.</p>
+<p><i>Remarks:</i> If <code>string_type</code> is a different type than <code>String</code>, conversion is performed by <code>cvt</code>.</p>
 </blockquote>
 <pre>const string <a name="string">string</a>(const codecvt_type&amp; cvt=codecvt()) const;
 const wstring <a name="wstring">wstring</a>(const codecvt_type&amp; cvt=codecvt()) const;
@@ -1061,25 +1032,18 @@
 <p><i>Remarks:</i> If <code>string_type</code> is a different type than
 function's return type, conversion is performed by <code>cvt</code>.</p>
 <p>If <code>string_type</code> is the same type as the
-function's return type, the function is permitted to return by <code>const&amp;</code>
-rather than <code>const</code> value. [<i>Note:</i> For POSIX, this occurs for
-<code>string()</code>, for Windows, <code>wstring()</code>. <i>--end note</i>]</p>
+function's return type, the function is permitted to return by <code>const&amp;</code> rather than <code>const</code> value. [<i>Note:</i> For POSIX, this occurs for <code>string()</code>, for Windows, <code>wstring()</code>. <i>--end note</i>]</p>
 </blockquote>
 
-<h3> <a name="path-generic-format-observers"><code><font size="4">path</font></code>
-generic format observers</a></h3>
-<p>The string returned by all generic format observers is in the
-generic pathname format.</p>
+<h3> <a name="path-generic-format-observers"><code><font size="4">path</font></code> generic format observers</a></h3>
+<p>The string returned by all generic format observers is in the generic pathname format.</p>
 <p>[<i>Note:</i> For POSIX, no conversion occurs, since the native format and
-generic format are the same. For Windows, backslashes are converted to slashes
-<i>--end note</i>]</p>
+generic format are the same. For Windows, backslashes are converted to slashes <i>--end note</i>]</p>
 <pre>template &lt;class String&gt;
 String <a name="generic_string-template">generic_string</a>(const codecvt_type&amp; cvt=codecvt()) const;</pre>
 <blockquote>
   <p><i>Returns:</i> <code>pathname</code>.</p>
-<p><i>Remarks:</i> If <code>string_type</code> is a different type than <code>
-String</code>, conversion is performed by
-<code>cvt</code>.</p>
+<p><i>Remarks:</i> If <code>string_type</code> is a different type than <code>String</code>, conversion is performed by <code>cvt</code>.</p>
 </blockquote>
 <pre>const string <a name="generic_string">generic_string</a>(const codecvt_type&amp; cvt=codecvt()) const;
 const wstring <a name="generic_wstring">generic_wstring</a>(const codecvt_type&amp; cvt=codecvt()) const;
@@ -1091,28 +1055,38 @@
 function's return type, conversion is performed by <code>cvt</code>.</p>
 <p>If <code>string_type</code> is of the same type as the
 function's return type, and the generic format is the same as the native format,
-the function is permitted to return by <code>const&amp;</code> rather than <code>
-const</code> value. [<i>Note:</i> For POSIX, this occurs for <code>string()</code>.
-It never occurs for Windows, because backslashes must be converted to slashes.
-<i>--end note</i>]</p>
+the function is permitted to return by <code>const&amp;</code> rather than <code>const</code> value. [<i>Note:</i> For POSIX, this occurs for <code>string()</code>.
+It never occurs for Windows, because backslashes must be converted to slashes. <i>--end note</i>]</p>
 </blockquote>
 
-<h3> <a name="path-decomposition"> <code><font size="4">path</font></code>
-decomposition</a></h3>
-<p><span style="background-color: #E0E0E0"><i>See the
-Path decomposition table for examples
-for values returned by decomposition functions. The
-Tutorial may also be
+<h3> <a name="path-compare"><code>path</code> compare</a></h3>
+<pre>int compare(const path&amp; p) const noexcept;</pre>
+<blockquote>
+ <p><i>Returns:</i> A value less than 0 if the elements of <code>*this</code> are lexicographically less than the elements of <code>p</code>, otherwise a
+ value greater than 0 if the elements of <code>*this</code> are
+ lexicographically greater than the elements of <code>p</code>, otherwise 0.</p>
+ <p>Remark: The elements are determined as if by iteration over the half-open
+ range [<code>begin()</code>, <code>end()</code>) for <code>*this</code> and&nbsp; <code>p</code>.</p>
+</blockquote>
+<pre>int compare(const std::string&amp; s) const</pre>
+<blockquote>
+ <p><i>Returns:</i> <code>compare(path(s))</code>.</p>
+</blockquote>
+<pre>int compare(const value_type* s) const</pre>
+<blockquote>
+ <p><i>Returns:</i> <code>compare(path(s))</code>.</p>
+</blockquote>
+<h3> <a name="path-decomposition"> <code><font size="4">path</font></code> decomposition</a></h3>
+<p><span style="background-color: #E0E0E0"><i>See the Path decomposition table for examples
+for values returned by decomposition functions. The Tutorial may also be
 helpful.</i></span></p>
 <pre>path <a name="path-root_name">root_name</a>() const;</pre>
 <blockquote>
-<p><i>Returns:</i> <i>root-name,</i> if <code>pathname</code> includes <i>
-root-name</i>, otherwise <code>path()</code>. </p>
+<p><i>Returns:</i> <i>root-name,</i> if <code>pathname</code> includes <i>root-name</i>, otherwise <code>path()</code>. </p>
 </blockquote>
 <pre>path <a name="path-root_directory">root_directory</a>() const;</pre>
 <blockquote>
-<p><i>Returns:</i> <i>root-directory</i>, if <code>pathname</code> includes <i>
-root-directory</i>, otherwise <code>path()</code>.</p>
+<p><i>Returns:</i> <i>root-directory</i>, if <code>pathname</code> includes <i>root-directory</i>, otherwise <code>path()</code>.</p>
 <p>If <i>root-directory</i> is composed of <i>slash name</i>, <i>slash</i> is
 excluded from the returned string.</p>
 </blockquote>
@@ -1122,17 +1096,13 @@
 </blockquote>
 <pre>path <a name="path-relative_path">relative_path</a>() const;</pre>
 <blockquote>
-<p><i>Returns:</i> A <code>path</code> composed from <code>pathname</code>, if <code>
-!empty()</code>, beginning
+<p><i>Returns:</i> A <code>path</code> composed from <code>pathname</code>, if <code>!empty()</code>, beginning
 with the first <i>filename</i> after <i>root-path</i>. Otherwise, <code>path()</code>.</p>
 </blockquote>
 <pre>path <a name="path-parent_path">parent_path</a>() const;</pre>
 <blockquote>
- <p><i>Returns:</i> <code>(empty() || begin() == --end()) ? path() : <i>pp</i></code>, where
- <code><i>pp</i></code> is constructed as if by
- starting with an empty <code>path</code> and successively applying <code>
- operator/=</code> for each element in the range <code>begin()</code>, <code>
- --end()</code>.</p>
+ <p><i>Returns:</i> <code>(empty() || begin() == --end()) ? path() : <i>pp</i></code>, where <code><i>pp</i></code> is constructed as if by
+ starting with an empty <code>path</code> and successively applying <code>operator/=</code> for each element in the range <code>begin()</code>, <code>--end()</code>.</p>
 </blockquote>
 <pre>path <a name="path-filename">filename</a>() const;</pre>
 <blockquote>
@@ -1149,8 +1119,7 @@
   consist solely of one or to two dots, returns
   the substring of <code>p.filename()</code> starting at its beginning and
   ending at the last dot (the dot is not included). Otherwise,
- returns <code>
- p.filename()</code>.</p>
+ returns <code>p.filename()</code>.</p>
   <p>[<i>Example:</i></p>
   <blockquote>
     <pre><code>std::cout &lt;&lt; path(&quot;/foo/bar.txt&quot;).stem();</code> // outputs &quot;<code>bar</code>&quot;
@@ -1168,8 +1137,7 @@
   <p><i>Returns:</i> if <code>p.filename()</code> contains a dot but does not
   consist solely of one or to two dots, returns
   the substring of <code>p.filename()</code> starting at the rightmost dot
- and ending at the path's end. Otherwise, returns an empty <code>path</code>
- object. </p>
+ and ending at the path's end. Otherwise, returns an empty <code>path</code> object. </p>
   <p><i>Remarks:</i> Implementations are permitted but not required to define additional
   behavior for file systems which append additional elements to extensions, such
   as alternate data streams or partitioned dataset names.</p>
@@ -1179,9 +1147,7 @@
   </blockquote>
   <p> <i>--end example</i>]</p>
   <p>[<i>Note:<b> </b></i>The dot is included in the return value so that
- it is possible to distinguish between no extension and an empty extension. See
- <a href="http://permalink.gmane.org/gmane.comp.lib.boost.devel/199744">
- http://permalink.gmane.org/gmane.comp.lib.boost.devel/199744> for more
+ it is possible to distinguish between no extension and an empty extension. See
http://permalink.gmane.org/gmane.comp.lib.boost.devel/199744 for more
   extensive rationale.&nbsp; <i>-- end note</i>]</p>
 </blockquote>
 <h3> <a name="path-query"> <code><font size="4">path</font></code> query</a></h3>
@@ -1223,11 +1189,8 @@
 </blockquote>
 <pre>bool <a name="path-is_absolute">is_absolute</a>() const;</pre>
 <blockquote>
- <p><i>Returns:</i> <code>true</code>
- if the elements of <code>root_path()</code> uniquely identify a directory, else <code>false</code>.</p>
- <p>[<i>Note:</i> On POSIX,<code>
- path(&quot;/foo&quot;).is_absolute()</code> returns <code>true</code>. On Windows, <code>
- path(&quot;/foo&quot;).is_absolute()</code> returns <code>false</code>. <i>--end note</i>]</p>
+ <p><i>Returns:</i> <code>true</code> if the elements of <code>root_path()</code> uniquely identify a directory, else <code>false</code>.</p>
+ <p>[<i>Note:</i> On POSIX,<code> path(&quot;/foo&quot;).is_absolute()</code> returns <code>true</code>. On Windows, <code>path(&quot;/foo&quot;).is_absolute()</code> returns <code>false</code>. <i>--end note</i>]</p>
 </blockquote>
 <pre>bool <a name="path-is_relative">is_relative</a>() const;</pre>
 <blockquote>
@@ -1238,8 +1201,7 @@
 <p> Path iterators iterate over the elements of the stored pathname.</p>
 <p> A <code>path::iterator</code> is a constant iterator satisfying all
 the requirements of a bidirectional iterator (C++ Std, 24.1.4 Bidirectional
-iterators [lib.bidirectional.iterators]). Its <code>value_type</code> is <code>
-path</code>.</p>
+iterators [lib.bidirectional.iterators]). Its <code>value_type</code> is <code>path</code>.</p>
   <p>Calling any non-const member function of a <code>path</code> object
   invalidates all iterators referring to elements of that object.</p>
 <p> The forward traversal order is as follows:</p>
@@ -1267,8 +1229,7 @@
 <blockquote>
   <p><i>Effects:</i> Stores <code>loc</code> as the default locale for all
   objects of type <code>path</code>.</p>
- <p><i>Returns:</i> The previous default locale for all objects of type <code>
- path</code>.</p>
+ <p><i>Returns:</i> The previous default locale for all objects of type <code>path</code>.</p>
 </blockquote>
 <pre>static const codecvt_type&amp; <a name="path-codecvt">codecvt</a>();</pre>
 <blockquote>
@@ -1278,11 +1239,9 @@
 
 
 <h3> <a name="path-deprecated-functions"><code><font size="4"> path</font></code> deprecated functions</a></h3>
-<p> Several member functions from previous versions of <code>class path</code>
-have been deprecated, either because they have been renamed or because the
+<p> Several member functions from previous versions of <code>class path</code> have been deprecated, either because they have been renamed or because the
 functionality is no longer desirable or has become obsolete.</p>
-<p> Deprecated functions available by default; will be suppressed if <code>
-BOOST_FILESYSTEM_NO_DEPRECATED</code> is defined:</p>
+<p> Deprecated functions available by default; will be suppressed if <code>BOOST_FILESYSTEM_NO_DEPRECATED</code> is defined:</p>
 <blockquote>
   <pre>path&amp; remove_leaf() { return remove_filename(); }
 path leaf() const { return filename(); }
@@ -1290,10 +1249,9 @@
 bool has_leaf() const { return !m_path.empty(); }
 bool has_branch_path() const { return !parent_path().empty(); }</pre>
 </blockquote>
-<p> Deprecated functions not available by default; will be supplied if <code>
-BOOST_FILESYSTEM_DEPRECATED</code> is defined:</p>
+<p> Deprecated functions not available by default; will be supplied if <code>BOOST_FILESYSTEM_DEPRECATED</code> is defined:</p>
 <blockquote>
- <pre>const std::string file_string() const { return native_string(); }
+<pre>const std::string file_string() const { return native_string(); }
 const std::string directory_string() const { return native_string(); }
 const std::string native_file_string() const { return native_string(); }
 const std::string native_directory_string() const { return native_string(); }
@@ -1301,21 +1259,14 @@
 const string_type external_directory_string() const { return native(); }</pre>
 </blockquote>
 
-<h3> <a name="path-non-member-functions"> <code><font size="4">path</font></code>
-non-member functions</a></h3>
-<pre>void swap( path&amp; lhs, path&amp; rhs )</pre>
-<blockquote>
- <p><i>Effects: </i><code>
- lhs.swap(rhs)</code>.</p>
-</blockquote>
+<h3> <a name="path-non-member-functions"> <code><font size="4">path</font></code> non-member functions</a></h3>
+
   <pre>bool lexicographical_compare(path::iterator first1, path::iterator last1,
- path::iterator first2, path::iterator last2)</pre>
+ path::iterator first2, path::iterator last2);</pre>
 <blockquote>
- <p><i>Returns:</i> <code>true</code> if the sequence of <code>native()</code>
- strings for the elements defined by the range <code>[first1,last1)</code> is
+ <p><i>Returns:</i> <code>true</code> if the sequence of <code>native()</code> strings for the elements defined by the half-open range <code>[first1,last1)</code> is
   lexicographically less than the sequence of <code>native()</code> strings for
- the elements defined by the range <code>[first2,last2)</code>. Returns <code>
- false</code> otherwise.</p>
+ the elements defined by the half-open range <code>[first2,last2)</code>. Returns <code>false</code> otherwise.</p>
   <p><i>Remarks:</i> If two sequences have the same number of elements and their
   corresponding elements are equivalent, then neither sequence is
   lexicographically less than the other. If one sequence is a prefix of the
@@ -1323,28 +1274,21 @@
   sequence. Otherwise, the lexicographical comparison of the sequences yields
   the same result as the comparison of the first corresponding pair of elements
   that are not equivalent.</p>
- <pre> for ( ; first1 != last1 &amp;&amp; first2 != last2 ; ++first1, ++first2) {
- if (first1-&gt;native() &lt; first2-&gt;native()) return true;
- if (first2-&gt;native() &lt; first1-&gt;native()) return false;
- }
- return first1 == last1 &amp;&amp; first2 != last2;</pre>
- <p>[<i>Note:</i> A <code>path</code> aware<code> lexicographical_compare</code>
- is provided to avoid infinite recursion in <code>std::lexicographical_compare</code>
- due to the <code>path</code> iterator's value type itself being <code>path</code>.
- <i>--end note</i>]</p>
+ <p>[<i>Note:</i> A <code>path</code> aware <code>lexicographical_compare</code> algorithm is provided for historical reasons. <i>--end note</i>]</p>
+</blockquote>
+<pre>void swap( path&amp; lhs, path&amp; rhs )</pre>
+<blockquote>
+ <p><i>Effects: </i><code>lhs.swap(rhs)</code>.</p>
 </blockquote>
 <pre>std::size_t <a name="hash_value">hash_value</a> (const path&amp; p);</pre>
 <blockquote>
   <p><i>Returns:</i> A hash value for the path <code>p</code>. If
- for two paths, <code>p1 == p2</code> then
- <code>hash_value(p1) == hash_value(p2)</code>.</p>
- <p>This allows paths to be used with
- Boost.Hash.</p>
+ for two paths, <code>p1 == p2</code> then <code>hash_value(p1) == hash_value(p2)</code>.</p>
+ <p>This allows paths to be used with Boost.Hash.</p>
 </blockquote>
 <pre>bool operator&lt; (const path&amp; lhs, const path&amp; rhs);</pre>
 <blockquote>
- <p><i>Returns:</i> <code>return lexicographical_compare(lhs.begin(), lhs.end(),
- rhs.begin(), rhs.end())</code>.</p>
+ <p><i>Returns:</i> <code>return lhs.compare(rhs.begin) &lt; 0</code>.</p>
 </blockquote>
 <pre>bool operator&lt;=(const path&amp; lhs, const path&amp; rhs);</pre>
 <blockquote>
@@ -1361,22 +1305,15 @@
 <pre>bool operator==(const path&amp; lhs, const path&amp; rhs);</pre>
 <blockquote>
   <p><i>Returns:</i> <code>!(lhs &lt; rhs) &amp;&amp; !(rhs &lt; lhs)</code>.</p>
- <p>[<i>Note:</i> Actual implementations may use an equivalent, but more
- efficient, algorithm. <i>--end note</i>]</p>
   <p>[<i>Note:</i> <a name="Path-equality">Path equality</a> and path
   equivalence have different semantics.</p>
- <p>Equality is determined by the <code>path</code>
- non-member <code>operator==</code>, which considers the two path's lexical
- representations only. Thus <code>path(&quot;foo&quot;) == &quot;bar&quot;</code> is never
- <code>true</code>.</p>
- <p>Equivalence is determined by the equivalent()
- non-member function, which determines if two paths resolve to the same file system entity.
- Thus <code>equivalent(&quot;foo&quot;, &quot;bar&quot;)</code> will be <code>true</code>
- when both paths resolve to the same file.</p>
+ <p>Equality is determined by the <code>path</code> non-member <code>operator==</code>, which considers the two path's lexical
+ representations only. Thus <code>path(&quot;foo&quot;) == &quot;bar&quot;</code> is never <code>true</code>.</p>
+ <p>Equivalence is determined by the equivalent() non-member function, which determines if two paths resolve to the same file system entity.
+ Thus <code>equivalent(&quot;foo&quot;, &quot;bar&quot;)</code> will be <code>true</code> when both paths resolve to the same file.</p>
   <p>Programmers wishing to determine if two paths are &quot;the same&quot; must decide if
   &quot;the same&quot; means &quot;the same representation&quot; or &quot;resolve to the same actual
- file&quot;, and choose the appropriate function accordingly. <i>
- -- end note</i>]</p>
+ file&quot;, and choose the appropriate function accordingly. <i>-- end note</i>]</p>
 </blockquote>
 <pre>bool operator!=(const path&amp; lhs, const path&amp; rhs);</pre>
 <blockquote>
@@ -1396,25 +1333,19 @@
                                              const path&amp; p)
 </pre>
 <blockquote>
- <p><i>Effects:</i>&nbsp;
- <code>os &lt;&lt; <a href="../../io/doc/quoted_manip.html">
- boost::io::quoted</a>(p.string&lt;std::basic_string&lt;Char&gt;&gt;(), static_cast&lt;Char&gt;('&amp;'));</code></p>
- <p><i>Returns:</i>
- <code>os</code></p>
+ <p><i>Effects:</i>&nbsp; <code>os &lt;&lt; boost::io::quoted(p.string&lt;std::basic_string&lt;Char&gt;&gt;(), static_cast&lt;Char&gt;('&amp;'));</code></p>
+ <p><i>Returns:</i> <code>os</code></p>
 </blockquote>
 <pre>template &lt;class Char, class Traits&gt;
 inline std::basic_istream&lt;Char, Traits&gt;&amp; operator&gt;&gt;(std::basic_istream&lt;Char, Traits&gt;&amp; is,
                                                     path&amp; p)
 </pre>
 <blockquote>
- <p><i>Effects:&nbsp; </i>
- <code>&nbsp;std::basic_string&lt;Char&gt; str;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is &gt;&gt;
- boost::io::quoted(str,
+ <p><i>Effects:&nbsp; </i><code>&nbsp;std::basic_string&lt;Char&gt; str;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is &gt;&gt; boost::io::quoted(str,
   static_cast&lt;Char&gt;('&amp;'));<br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p = str;</code></p>
- <p><i>Returns:</i>
- <code>is</code></p>
+ <p><i>Returns:</i> <code>is</code></p>
   </blockquote>
 <h3><a name="Class-filesystem_error">Class <code>filesystem_error</code></a></h3>
 <pre>namespace boost
@@ -1497,8 +1428,7 @@
     </tr>
     <tr>
       <td width="18%" valign="top"><code>path1()</code></td>
- <td width="82%">Reference to stored copy of
- <code>p1</code></td>
+ <td width="82%">Reference to stored copy of <code>p1</code></td>
     </tr>
     <tr>
       <td width="18%" valign="top"><code>path2().empty()</code></td>
@@ -1527,13 +1457,11 @@
     </tr>
     <tr>
       <td width="18%"><code>path1()</code></td>
- <td width="82%">Reference to stored copy of
- <code>p1</code></td>
+ <td width="82%">Reference to stored copy of <code>p1</code></td>
     </tr>
     <tr>
       <td width="18%"><code>path2()</code></td>
- <td width="82%">Reference to stored copy of
- <code>p2</code></td>
+ <td width="82%">Reference to stored copy of <code>p2</code></td>
     </tr>
   </table>
 </blockquote>
@@ -1550,8 +1478,7 @@
 <pre>const char* <a name="filesystem_error-what">what</a>() const;</pre>
 <blockquote>
   <p><i>Returns: </i>A string containing <code>runtime_error::what()</code>. The exact format is unspecified.
- Implementations are encouraged but not required to include <code>
- path1.native_string()</code>if not empty, <code>path2.native_string()</code>if
+ Implementations are encouraged but not required to include <code>path1.native_string()</code>if not empty, <code>path2.native_string()</code>if
   not empty, and <code>system_error::what()</code> strings in the returned
   string.</p>
 </blockquote>
@@ -1565,8 +1492,7 @@
   <tr>
     <td><code>status_error</code></td>
     <td>An error occurred while trying to obtain the status of the file. The
- file simply not being found is <b><u>not</u></b> considered a status error.
- </td>
+ file simply not being found is <b><u>not</u></b> considered a status error. </td>
   </tr>
   <tr>
     <td><code>file_not_found</code></td>
@@ -1614,11 +1540,9 @@
 <blockquote>
 <p>Caution: Operating systems do not always support permissions as described in
 the table.</p>
-<p>There is much variation in the meaning of <code><a href="#sticky_bit">
-sticky_bit</a></code>; do not use it unless you understand what it means for
+<p>There is much variation in the meaning of <code>sticky_bit</code>; do not use it unless you understand what it means for
 your operating system.</p>
-<p>There is much variation in how operating systems treat symlinks. See <code>
-symlink_perms</code>.</p>
+<p>There is much variation in how operating systems treat symlinks. See <code>symlink_perms</code>.</p>
 <p>Windows: All permissions except write are currently ignored. There is only a
 single write permission; setting write permission for owner, group, or others
 sets write permission for all, and removing write permission for owner, group,
@@ -1636,8 +1560,7 @@
 
 <tr><td>
   <p dir="ltr"><code>no_perms</code></td><td><code>0</code></td><td></td>
- <td>There are no permissions set for the file. Note: <code>file_not_found</code> is
- <code>no_perms</code> rather than <code>perms_not_known</code></td>
+ <td>There are no permissions set for the file. Note: <code>file_not_found</code> is <code>no_perms</code> rather than <code>perms_not_known</code></td>
 </tr>
 <tr><td><code>owner_read</code></td><td><code>0400</code></td><td> <code>S_IRUSR</code></td>
   <td> Read permission, owner</td>
@@ -1684,7 +1607,7 @@
 <tr><td><code>set_gid_on_exe</code></td><td><code>02000</code></td><td> <code>S_ISGID</code></td>
   <td> Set-group-ID on execution</td>
 </tr>
-<tr><td><code><a name="sticky_bit">sticky_bit</a> </code> </td><td><code>01000</code></td><td> <code>S_ISVTX</code></td>
+<tr><td><code><a name="sticky_bit">sticky_bit</a> </code></td><td><code>01000</code></td><td> <code>S_ISVTX</code></td>
   <td> Meaning varies; see http:en.wikipedia.org/wiki/Sticky_bit</td>
 </tr>
 <tr><td><code><a name="perms_mask">perms_mask</a></code></td><td><code>07777</code></td><td> &nbsp;</td>
@@ -1704,11 +1627,9 @@
   file's current bits</td>
 </tr>
 <tr><td><code><a name="symlink_perms">symlink_perms</a></code></td><td><code>0x4000</code></td><td></td><td>
- On POSIX <code>permissions()</code> resolves symlinks unless <code>symlink_perms</code>
- is specified.
+ On POSIX <code>permissions()</code> resolves symlinks unless <code>symlink_perms</code> is specified.
   Meaningless on Windows as <code>permissions()</code> never resolves symlinks.
- Meaningless on Mac OS X and some other BSD systems as <code>permissions()</code>
- always resolves symlinks. Get over it.</td>
+ Meaningless on Mac OS X and some other BSD systems as <code>permissions()</code> always resolves symlinks. Get over it.</td>
 </tr>
 
 </table>
@@ -1742,31 +1663,24 @@
 } // namespace boost</pre>
 <p>An object of type <code>file_status</code> stores information about the type
 and permissions of a file.</p>
-<h4 dir="ltr"><a name="file_status-constructors"><code>file_status</code>
-constructors</a></h4>
+<h4 dir="ltr"><a name="file_status-constructors"><code>file_status</code> constructors</a></h4>
 <pre>explicit file_status() noexcept;</pre>
 <blockquote>
- <p><i>Postconditions:</i> <code>type() == status_error</code>, <code>
- permissions() == perms_not_known</code>.</p>
+ <p><i>Postconditions:</i> <code>type() == status_error</code>, <code>permissions() == perms_not_known</code>.</p>
 </blockquote>
 <pre>explicit file_status(file_type ft, perms prms = perms_not_known) noexcept;</pre>
 <blockquote>
   <p><i>Postconditions:</i> <code>type() == ft</code>, <code>permissions() ==
   prms</code>.</p>
 </blockquote>
- <h4 dir="ltr"><a name="file_status-observers"><code>file_status</code>
- observers</a></h4>
+ <h4 dir="ltr"><a name="file_status-observers"><code>file_status</code> observers</a></h4>
 <pre>file_type type() const noexcept;</pre>
 <blockquote>
- <p><i>Returns: </i>The value of <code>type()</code> specified by the <i>
- postconditions</i> of the most recent call to a constructor, operator=, or
- <code>type(file_type)</code> function.</p>
+ <p><i>Returns: </i>The value of <code>type()</code> specified by the <i>postconditions</i> of the most recent call to a constructor, operator=, or <code>type(file_type)</code> function.</p>
 </blockquote>
 <pre>perms permissions() const noexcept;</pre>
 <blockquote>
- <p><i>Returns: </i>The value of <code>permissions()</code> specified by the <i>
- postconditions</i> of the most recent call to a constructor, operator=, or
- <code>permissions(perms)</code> function.</p>
+ <p><i>Returns: </i>The value of <code>permissions()</code> specified by the <i>postconditions</i> of the most recent call to a constructor, operator=, or <code>permissions(perms)</code> function.</p>
 </blockquote>
 <h4 dir="ltr"><a name="file_status-modifiers"><code>file_status</code> modifiers</a></h4>
 <pre>void type(file_type ft) noexcept;</pre>
@@ -1825,9 +1739,7 @@
 } // namespace boost</pre>
 </div>
 <p>A <code>directory_entry</code> object stores a <code>path object</code>,
-a <code>file_status</code> object for non-symbolic link status, and a <code>
-file_status</code> object for symbolic link status. The <code>file_status</code>
-objects act as value caches.</p>
+a <code>file_status</code> object for non-symbolic link status, and a <code>file_status</code> object for symbolic link status. The <code>file_status</code> objects act as value caches.</p>
 <blockquote>
 <p>[<i>Note:</i> Because <code>status()</code>on a pathname may be a very expensive operation,
 some operating systems provide status information as a byproduct of directory
@@ -1937,8 +1849,7 @@
 <pre>file_status status() const;
 file_status status(system::error_code&amp; ec) const;</pre>
 <blockquote>
-<p><i>Effects:</i>
-As if,</p>
+<p><i>Effects:</i> As if,</p>
   <blockquote>
     <pre>if ( !status_known( m_status ) )
 {
@@ -1949,29 +1860,23 @@
   </blockquote>
   <p><i>Returns:</i> <code>m_status</code></p>
   
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   
 </blockquote>
 <pre>file_status symlink_status() const;
 file_status symlink_status(system::error_code&amp; ec) const;</pre>
 <blockquote>
 <p>
- <i>Effects:</i>
-As if,</p>
+ <i>Effects:</i> As if,</p>
   <blockquote>
     <pre>if ( !status_known( m_symlink_status ) )
 {
   m_symlink_status = symlink_status(m_path<i>[, ec]</i>);
 }</pre>
   </blockquote>
- <p><i>Returns:</i> <code>
- m_symlink_status</code></p>
+ <p><i>Returns:</i> <code>m_symlink_status</code></p>
   
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   
 </blockquote>
 <pre>bool operator==(const directory_entry&amp; rhs);</pre>
@@ -2006,8 +1911,7 @@
 </blockquote>
 <h3><a name="Class-directory_iterator">Class <code>directory_iterator</code></a></h3>
 <p>Objects of type <code>directory_iterator</code> provide standard library
-compliant iteration over the contents of a directory. Also see class <code>
-recursive_directory_iterator</code>.</p>
+compliant iteration over the contents of a directory. Also see class <code>recursive_directory_iterator</code>.</p>
 <pre>namespace boost
 {
   namespace filesystem
@@ -2037,25 +1941,16 @@
 <p> <code>directory_iterator</code> satisfies the requirements of an
 input iterator (C++ Std, 24.2.1, Input iterators [input.iterators]).</p>
 <p>A <code>directory_iterator</code> reads successive elements from the directory for
-which it was constructed, as if by calling <i>POSIX</i>
-<code>
-readdir_r()</code>. After a <code>directory_iterator</code> is constructed, and every time
-<code>operator++</code> is called,
-it reads a directory element and stores information about it in a object of type <code>
-directory_entry</code>.
-<code>operator++</code> is not equality preserving; that is, <code>i == j</code> does not imply that
-<code>++i == ++j</code>. </p>
+which it was constructed, as if by calling <i>POSIX</i> <code>readdir_r()</code>. After a <code>directory_iterator</code> is constructed, and every time <code>operator++</code> is called,
+it reads a directory element and stores information about it in a object of type <code>directory_entry</code>. <code>operator++</code> is not equality preserving; that is, <code>i == j</code> does not imply that <code>++i == ++j</code>. </p>
 <blockquote>
 <p>[<i>Note:</i> The practical consequence of not preserving equality is that directory iterators
 can only be used for single-pass algorithms. <i>--end note</i>]</p>
 </blockquote>
 <p>If the end of the directory elements is reached, the iterator becomes equal to
-the end iterator value. The constructor <code>directory_iterator()</code>
-with no arguments always constructs an end iterator object, which is the only
-legitimate iterator to be used for the end condition. The result of <code>
-operator*</code> on an end iterator is not defined. For any other iterator value
-a <code>const directory_entry&amp;</code> is returned. The result of
-<code>operator-&gt;</code> on an end iterator is not defined. For any other iterator value a <code>const directory_entry*</code> is
+the end iterator value. The constructor <code>directory_iterator()</code> with no arguments always constructs an end iterator object, which is the only
+legitimate iterator to be used for the end condition. The result of <code>operator*</code> on an end iterator is not defined. For any other iterator value
+a <code>const directory_entry&amp;</code> is returned. The result of <code>operator-&gt;</code> on an end iterator is not defined. For any other iterator value a <code>const directory_entry*</code> is
 returned. </p>
 <p>Two end iterators are always equal. An end iterator is not equal to a non-end
 iterator.</p>
@@ -2063,12 +1958,8 @@
 <p><i><span style="background-color: #E0E0E0">The above wording is based on the
 Standard Library's istream_iterator wording.</span></i></p>
 </blockquote>
-<p>The result of calling the <code>path()</code> member of the <code>
-directory_entry</code> object obtained by dereferencing a <code>
-directory_iterator</code> is a reference to a <code>path</code>
-object composed of the directory argument from which the iterator was
-constructed with filename of the directory entry appended as if by <code>
-operator/=</code>. </p>
+<p>The result of calling the <code>path()</code> member of the <code>directory_entry</code> object obtained by dereferencing a <code>directory_iterator</code> is a reference to a <code>path</code> object composed of the directory argument from which the iterator was
+constructed with filename of the directory entry appended as if by <code>operator/=</code>. </p>
 <p>Directory iteration shall not yield directory entries for the current (<i>dot</i>)
 and parent (<i>dot dot</i>) directories.</p>
 <p>The order of directory entries obtained by dereferencing successive
@@ -2083,11 +1974,7 @@
 <p>If a file is removed from or added to a directory after the
 construction of a <code>directory_iterator</code> for the directory, it is
 unspecified whether or not subsequent incrementing of the iterator will ever
-result in an iterator whose value is the removed or added directory entry. See
-<i>POSIX</i>
-<code>
-readdir_r()</code>. <i>
---end note</i>]</p>
+result in an iterator whose value is the removed or added directory entry. See <i>POSIX</i> <code>readdir_r()</code>. <i>--end note</i>]</p>
 </blockquote>
 <h4><a name="directory_iterator-members"><code>directory_iterator</code> members</a></h4>
 
@@ -2107,13 +1994,9 @@
 <p><i>Effects:</i> Constructs a iterator representing the first
 entry in the directory <code>p</code> resolves to, if any; otherwise, the end iterator.</p>
 
-<p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
-
-<p>[<i>Note:</i> To iterate over the current directory, use <code>
-directory_iterator(&quot;.&quot;)</code> rather than <code>directory_iterator(&quot;&quot;)</code>.
-<i>-- end note</i>]</p>
+<p><i>Throws:</i> As specified in Error reporting.</p>
+
+<p>[<i>Note:</i> To iterate over the current directory, use <code>directory_iterator(&quot;.&quot;)</code> rather than <code>directory_iterator(&quot;&quot;)</code>. <i>-- end note</i>]</p>
 </blockquote>
 <pre>directory_iterator&amp; <a name="directory_iterator-increment">operator++</a>();
 directory_iterator&amp; increment(system::error_code&amp; ec);</pre>
@@ -2123,9 +2006,7 @@
 
 <p><i>Returns:</i> <code>*this</code>.</p>
 
-<p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+<p><i>Throws:</i> As specified in Error reporting.</p>
 
 </blockquote>
 <h3><a name="Class-recursive_directory_iterator">Class <code>recursive_directory_iterator</code></a></h3>
@@ -2205,23 +2086,15 @@
 <p><i>Effects:</i>&nbsp; Constructs a iterator representing the first
 entry in the directory <code>p</code> resolves to, if any; otherwise, the end iterator.</p>
 
-<p dir="ltr"><i>Postcondition: </i>Unless the end iterator was constructed,<i> </i>
-<code>level() == 0 &amp;&amp; no_push_pending() == false &amp;&amp; m_options == opt</code>.
-For the signature without a <code>symlink_option</code> argument, <code>opt</code>
-is assumed to be <code>symlink_option::none</code>.</p>
-
-<p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
-
-<p>[<i>Note:</i> To iterate over the current directory, use <code>recursive_directory_iterator(&quot;.&quot;)</code> rather than
-<code>recursive_directory_iterator(&quot;&quot;)</code>.
-<i>-- end note</i>]</p>
+<p dir="ltr"><i>Postcondition: </i>Unless the end iterator was constructed,<i> </i><code>level() == 0 &amp;&amp; no_push_pending() == false &amp;&amp; m_options == opt</code>.
+For the signature without a <code>symlink_option</code> argument, <code>opt</code> is assumed to be <code>symlink_option::none</code>.</p>
+
+<p><i>Throws:</i> As specified in Error reporting.</p>
+
+<p>[<i>Note:</i> To iterate over the current directory, use <code>recursive_directory_iterator(&quot;.&quot;)</code> rather than <code>recursive_directory_iterator(&quot;&quot;)</code>. <i>-- end note</i>]</p>
 
 <p>[<i>Note:</i> By default, <code>recursive_directory_iterator</code> does not
-follow directory symlinks. To follow directory symlinks, specify <code>opt</code>
-as <code>symlink_option::recurse</code>
-<i>-- end note</i>]</p>
+follow directory symlinks. To follow directory symlinks, specify <code>opt</code> as <code>symlink_option::recurse</code> <i>-- end note</i>]</p>
 </blockquote>
 <pre>int level() const noexcept;</pre>
 <blockquote>
@@ -2245,8 +2118,7 @@
 
 <p dir="ltr">if <code>!no_push_pending() &amp;&amp; is_directory(this-&gt;status())
 &amp;&amp; (!is_symlink(this-&gt;symlink_status()) || (m_options
-&amp; symlink_option::recurse) != 0)</code> then&nbsp; <code>m_level</code>
-is incremented and directory <code>(*this)-&gt;path()</code> is recursively iterated into.<br>
+&amp; symlink_option::recurse) != 0)</code> then&nbsp; <code>m_level</code> is incremented and directory <code>(*this)-&gt;path()</code> is recursively iterated into.<br>
 &nbsp;</p>
 
   </li>
@@ -2258,9 +2130,7 @@
 
 <p><i>Returns:</i> <code>*this</code>.</p>
 
-<p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+<p><i>Throws:</i> As specified in Error reporting.</p>
 
 </blockquote>
 <pre>void pop();</pre>
@@ -2282,11 +2152,8 @@
 storage.</p>
 <p>Operational functions access a file by resolving an
 object of class <code>path</code> to a particular file in a file hierarchy. The
-path is resolved as if by the <i>POSIX</i>
-<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap04.html#tag_04_11">
-Pathname Resolution</a> mechanism.</p>
-<p>[<i>Note: </i>Because hardware failures, network failures,
-file system races, and many
+path is resolved as if by the <i>POSIX</i> Pathname Resolution mechanism.</p>
+<p>[<i>Note: </i>Because hardware failures, network failures, file system races, and many
 other kinds of errors occur frequently in file system operations, users should be aware
 that any filesystem operational function, no matter how apparently innocuous, may encounter
 an error.&nbsp;See Error reporting. <i>-- end note</i>]</p>
@@ -2315,8 +2182,7 @@
       <td align="center"><code>return absolute(base) / p</code></td>
     </tr>
   </table>
- <p dir="ltr">[<i>Note:</i> For the returned path, <code>rp,</code> <code>
- rp.is_absolute()</code> is true. <i>-- end note</i>]</p>
+ <p dir="ltr">[<i>Note:</i> For the returned path, <code>rp,</code> <code>rp.is_absolute()</code> is true. <i>-- end note</i>]</p>
   <p><i>Throws:</i> If <code>base.is_absolute()</code> is true, throws only if
   memory allocation fails.</p>
 </blockquote>
@@ -2330,9 +2196,7 @@
 <p><i>Returns:</i> A canonical path that refers to
 the same file system object as <code>absolute(p,base)</code>. For the overload
 without a <code>base</code> argument, <code>base</code> is <code>current_path()</code>.</p>
- <p><i>Throws:</i>&nbsp; As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i>&nbsp; As specified in Error reporting.</p>
   
   <p><i>Remarks:</i> <code>!exists(p)</code> is an error.</p>
   
@@ -2356,9 +2220,7 @@
 else
 <i> Report error as specified in Error reporting.</i></pre>
   </blockquote>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   
 </blockquote>
 <pre>void <a name="copy_directory">copy_directory</a>(const path&amp; from, const path&amp; to);
@@ -2366,9 +2228,7 @@
 <blockquote>
   <p><i>Effects: </i></p>
   
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   
 </blockquote>
 <pre>void copy_file(const path&amp; from, const path&amp; to);
@@ -2377,20 +2237,15 @@
   <p><i>Effects: </i><code>copy_file(from, to,
   copy_option::fail_if_exists</code><i>[</i><code>, ec</code><i>]</i><code>)</code>.</p>
   
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   
 </blockquote>
 <pre>void <a name="copy_file">copy_file</a>(const path&amp; from, const path&amp; to, copy_option option);
 void <a name="copy_file2">copy_file</a>(const path&amp; from, const path&amp; to, copy_option option, system::error_code&amp; ec);</pre>
 <blockquote>
   <p><i>Effects:</i> If <code>option == copy_option::</code><code>fail_if_exists
- &amp;&amp; exists(to)</code>, an error is reported. Otherwise, the contents and attributes of the file <code>from</code>
- resolves to are copied to the file <code>to</code> resolves to.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ &amp;&amp; exists(to)</code>, an error is reported. Otherwise, the contents and attributes of the file <code>from</code> resolves to are copied to the file <code>to</code> resolves to.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>void <a name="copy_symlink">copy_symlink</a>(const path&amp; existing_symlink, const path&amp; new_symlink);
 void copy_symlink(const path&amp; existing_symlink, const path&amp; new_symlink, system::error_code&amp; ec);</pre>
@@ -2398,73 +2253,49 @@
   <p><i>Effects: </i><code>create_symlink(read_symlink(existing_symlink</code><i>[</i><code>, ec</code><i>]</i><code>),
   new_symlink</code><i>[</i><code>, ec</code><i>]</i><code>)</code>.</p>
   
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   
 </blockquote>
 <pre>bool <a name="create_directories">create_directories</a>(const path&amp; p);
 bool <a name="create_directories2">create_directories</a>(const path&amp; p, system::error_code&amp; ec);</pre>
 <blockquote>
   <p><i>Requires:</i> <code>p.empty() || <br>
- forall px: px == p || is_parent(px, p): is_directory(px) || !exists( px )</code>
- </p>
+ forall px: px == p || is_parent(px, p): is_directory(px) || !exists( px )</code> </p>
   <p><i>Postcondition:</i> <code>is_directory(p)</code></p>
   <p><i>Returns:</i> The value of <code>!exists(p)</code> prior to the
   establishment of the postcondition.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>bool <a name="create_directory">create_directory</a>(const path&amp; p);
 bool <a name="create_directory2">create_directory</a>(const path&amp; p, system::error_code&amp; ec);</pre>
 <blockquote>
   <p><i>Effects:</i> Attempts to create the directory <code>p</code> resolves to,
- as if by<i> POSIX </i><code>
- mkdir()</code> with a second argument of S_IRWXU|S_IRWXG|S_IRWXO. </p>
+ as if by<i> POSIX </i><code>mkdir()</code> with a second argument of S_IRWXU|S_IRWXG|S_IRWXO. </p>
   <p><i>Postcondition:</i> <code>is_directory(p)</code></p>
- <p><i>Returns:</i> <code>true</code> if a new directory was created, otherwise
- <code>false</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Returns:</i> <code>true</code> if a new directory was created, otherwise <code>false</code>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>void <a name="create_directory_symlink">create_directory_symlink</a>(const path&amp; to, const path&amp; new_symlink);
 void create_directory_symlink(const path&amp; to, const path&amp; new_symlink, system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Effects:</i>
- Establishes the postcondition, as if by <i>
- POSIX</i>
- <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/symlink.html">
- symlink()</a></code>.</p>
+ <p><i>Effects:</i> Establishes the postcondition, as if by <i>POSIX</i> <code>symlink()</code>.</p>
   <p><i>
   Postcondition:</i> <code>new_symlink</code> resolves to a symbolic link file that
   contains an unspecified representation of <code>to</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
- <p dir="ltr">[<i>Note:</i>
- Some operating systems, such as Windows, require symlink creation to
- identify that the link is to a directory. Portable code should use <code>
- create_directory_symlink()</code> to create directory symlinks rather than
- <code>create_symlink()</code> <i>-- end note</i>]</p>
- <p>[<i>Note:</i>
- Some operating systems do not support symbolic links at all or support
+ <p><i>Throws:</i> As specified in Error reporting.</p>
+ <p dir="ltr">[<i>Note:</i> Some operating systems, such as Windows, require symlink creation to
+ identify that the link is to a directory. Portable code should use <code>create_directory_symlink()</code> to create directory symlinks rather than <code>create_symlink()</code> <i>-- end note</i>]</p>
+ <p>[<i>Note:</i> Some operating systems do not support symbolic links at all or support
   them only for regular files.
   Some file systems do not
   support
   symbolic links regardless of the operating system - the FAT file system used on
- memory cards and flash drives, for example. <i>-- end note</i>]</p>
+ memory cards and flash drives, for example. <i>-- end note</i>]</p>
   </blockquote>
 <pre>void <a name="create_hard_link">create_hard_link</a>(const path&amp; to, const path&amp; new_hard_link);
 void <a name="create_hard_link2">create_hard_link</a>(const path&amp; to, const path&amp; new_hard_link, system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Effects:</i> Establishes the postcondition, as if by
- <i>POSIX</i>
- <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/link.html">
- link()</a></code>.</p>
+ <p><i>Effects:</i> Establishes the postcondition, as if by <i>POSIX</i> <code>link()</code>.</p>
   <p><i>Postcondition:</i></p>
   <ul>
     <li>&nbsp;<code>exists(to) &amp;&amp;
@@ -2474,51 +2305,34 @@
     <li>The contents of the file or directory
     <code>to</code> resolves to are unchanged.</li>
   </ul>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
- <p>[<i>Note:</i>
- Some operating systems do not support hard links at all or support
+ <p><i>Throws:</i> As specified in Error reporting.</p>
+ <p>[<i>Note:</i> Some operating systems do not support hard links at all or support
   them only for regular files. Some file systems do not support hard
   links regardless of the operating system - the FAT file system used on memory
   cards and flash drives, for example. Some file systems limit the number of
- links per file. <i>-- end note</i>]</p>
+ links per file. <i>-- end note</i>]</p>
   </blockquote>
 <pre>void <a name="create_symlink">create_symlink</a>(const path&amp; to, const path&amp; new_symlink);
 void <a name="create_symlink2">create_symlink</a>(const path&amp; to, const path&amp; new_symlink, system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Effects:</i>
- Establishes the postcondition, as if by <i>
- POSIX</i>
- <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/symlink.html">
- symlink()</a></code>.</p>
+ <p><i>Effects:</i> Establishes the postcondition, as if by <i>POSIX</i> <code>symlink()</code>.</p>
   <p><i>
   Postcondition:</i> <code>new_symlink</code> resolves to a symbolic link file that
   contains an unspecified representation of <code>to</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
- <p>[<i>Note:</i>
- Some operating systems do not support symbolic links at all or support
+ <p><i>Throws:</i> As specified in Error reporting.</p>
+ <p>[<i>Note:</i> Some operating systems do not support symbolic links at all or support
   them only for regular files.
   Some file systems do not
   support
   symbolic links regardless of the operating system - the FAT system used on
- memory cards and flash drives, for example. <i>-- end note</i>]</p>
+ memory cards and flash drives, for example. <i>-- end note</i>]</p>
   </blockquote>
 <pre>path <a name="current_path">current_path</a>();
 path <a name="current_path2">current_path</a>(system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Returns:</i> The current working directory path, as if by <i>POSIX</i>
- <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/getcwd.html">
- getcwd()</a></code>. <code>is_absolute()</code> is true for the returned path.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
- <p>[<i>Note: </i>The <code>
- current_path()</code> name was chosen to emphasize that the return is a
+ <p><i>Returns:</i> The current working directory path, as if by <i>POSIX</i> <code>getcwd()</code>. <code>is_absolute()</code> is true for the returned path.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
+ <p>[<i>Note: </i>The <code>current_path()</code> name was chosen to emphasize that the return is a
   path, not just a single directory name.</p>
   <p>The current path as returned by many operating systems is a dangerous
   global variable. It may be changed unexpectedly by a third-party or system
@@ -2527,24 +2341,16 @@
 <pre>void current_path(const path&amp; p);
 void current_path(const path&amp; p, system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Effects:</i>
- Establishes the postcondition, as if by <i>
- POSIX</i>
- <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/chdir.html">
- chdir()</a></code>.</p>
+ <p><i>Effects:</i> Establishes the postcondition, as if by <i>POSIX</i> <code>chdir()</code>.</p>
 <p><i>Postcondition:</i> <code>equivalent(p, current_path())</code>.</p>
-<p><i>Throws:</i> As specified in
-<a href="#Error-reporting">
-Error reporting</a>.</p>
+<p><i>Throws:</i> As specified in Error reporting.</p>
   <p>[<i>Note: </i>The current path for many operating systems is a dangerous
   global state. It may be changed unexpectedly by a third-party or system
   library functions, or by another thread.&nbsp; <i>-- end note</i>]</p>
 </blockquote>
 <pre>bool <a name="exists">exists</a>(file_status s) noexcept;</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>status_known(s) &amp;&amp; s.type() != file_not_found</code></p>
+ <p><i>Returns:</i> <code>status_known(s) &amp;&amp; s.type() != file_not_found</code></p>
 </blockquote>
 <pre>bool <a name="exists2">exists</a>(const path&amp; p);
 bool <a name="exists3">exists</a>(const path&amp; p, system::error_code&amp; ec) noexcept;</pre>
@@ -2557,8 +2363,7 @@
 <pre><code>bool <a name="equivalent">equivalent</a>(const path&amp; p1, const path&amp; p2);
 bool <a name="equivalent2">equivalent</a>(const path&amp; p1, const path&amp; p2, system::error_code&amp; ec);</code></pre>
 <blockquote>
- <p><i>Effects:</i> Determines <code>file_status s1</code>
- and <code>s2</code>, as if by <code>status(p1)</code> and&nbsp; <code>status(p2)</code>,
+ <p><i>Effects:</i> Determines <code>file_status s1</code> and <code>s2</code>, as if by <code>status(p1)</code> and&nbsp; <code>status(p2)</code>,
   respectively.</p>
   <p><i>Returns:</i> <code>true</code>, if <code>sf1 ==
   sf2</code> and <code>p1</code> and <code>p2</code> resolve to the same file
@@ -2566,28 +2371,13 @@
   <blockquote>
   <p>Two paths are considered to resolve to the same
   file system entity if two candidate entities reside on the same device at the
- same location. This is determined as if by the values of the <i>POSIX</i>
- <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/stat.h.html">
- stat</a></code> structure<code>,</code> obtained as if by <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/stat.html">
- stat()</a></code> for the two paths, having equal <code>st_dev</code> values
+ same location. This is determined as if by the values of the <i>POSIX</i> <code>stat</code> structure<code>,</code> obtained as if by <code>stat()</code> for the two paths, having equal <code>st_dev</code> values
   and equal <code>st_ino</code> values.</p>
- <p>[<i>Note:</i> <i>POSIX</i> requires that <i>&quot;st_dev</i>
- must be unique within a Local Area Network&quot;. Conservative <i>POSIX</i>
- implementations may also wish to check for equal <code>st_size</code> and
- <code>st_mtime</code> values. <i>Windows</i> implementations may use <code>
- GetFileInformationByHandle()</code> as a surrogate for <code>stat()</code>,
- and consider &quot;same&quot; to be equal values for <code>dwVolumeSerialNumber</code>,
- <code>nFileIndexHigh</code>, <code>nFileIndexLow</code>, <code>nFileSizeHigh</code>,
- <code>nFileSizeLow</code>, <code>ftLastWriteTime.dwLowDateTime</code>, and
- <code>ftLastWriteTime.dwHighDateTime</code>. <i>-- end note</i>]</p>
- </blockquote>
- <p><i>Throws:</i> <code>filesystem_error</code>
- if <code>(!exists(s1) &amp;&amp; !exists(s2)) || (is_other(s1) &amp;&amp; is_other(s2))</code>,
- otherwise as specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p>[<i>Note:</i> <i>POSIX</i> requires that <i>&quot;st_dev</i> must be unique within a Local Area Network&quot;. Conservative <i>POSIX</i> implementations may also wish to check for equal <code>st_size</code> and <code>st_mtime</code> values. <i>Windows</i> implementations may use <code>GetFileInformationByHandle()</code> as a surrogate for <code>stat()</code>,
+ and consider &quot;same&quot; to be equal values for <code>dwVolumeSerialNumber</code>, <code>nFileIndexHigh</code>, <code>nFileIndexLow</code>, <code>nFileSizeHigh</code>, <code>nFileSizeLow</code>, <code>ftLastWriteTime.dwLowDateTime</code>, and <code>ftLastWriteTime.dwHighDateTime</code>. <i>-- end note</i>]</p>
+ </blockquote>
+ <p><i>Throws:</i> <code>filesystem_error</code> if <code>(!exists(s1) &amp;&amp; !exists(s2)) || (is_other(s1) &amp;&amp; is_other(s2))</code>,
+ otherwise as specified in Error reporting.</p>
 </blockquote>
 <div dir="ltr">
 <pre>uintmax_t <a name="file_size">file_size</a>(const path&amp; p);
@@ -2597,44 +2387,32 @@
   <p><i>Returns:</i> If <code>exists(p) &amp;&amp; is_regular_file(p)</code>, the size
   in bytes
   of the file <code>p</code> resolves to, determined as if by the value of
- the <i>POSIX</i> <code>
- stat</code> structure member <code>st_size</code>
- obtained as if by <i>POSIX</i> <code>
- stat()</code>.
+ the <i>POSIX</i> <code>stat</code> structure member <code>st_size</code> obtained as if by <i>POSIX</i> <code>stat()</code>.
   Otherwise, <code>static_cast&lt;uintmax_t&gt;(-1)</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>uintmax_t <a name="hard_link_count">hard_link_count</a>(const path&amp; p);
 uintmax_t hard_link_count(const path&amp; p, system::error_code&amp; ec);</pre>
 <blockquote>
 
   <p><i>Returns:</i> The number of hard links for <code>p</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 
 </blockquote>
 
 <pre>const path&amp; <a name="initial_path">initial_path</a>();
 const path&amp; <a name="initial_path2">initial_path</a>(<code>system::error_code&amp; ec</code>);</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>current_path()</code> as of the first call to <code>initial_path()</code>.</p>
- <p>[<i>Note:</i> <code>
- initial_path()</code> is not thread safe, and may return an undesirable result
+ <p><i>Returns:</i> <code>current_path()</code> as of the first call to <code>initial_path()</code>.</p>
+ <p>[<i>Note:</i> <code>initial_path()</code> is not thread safe, and may return an undesirable result
   if called subsequent to a change to the current directory. These problems can
   be avoided by calling <code>initial_path()</code> immediately on entry to
   main().&nbsp; <i>--end note</i>]</p>
- <p><i>Throws:</i> For the first call, as specified in
- <a href="#Error-reporting">
- Error reporting</a>. Subsequent calls throw nothing.</p>
+ <p><i>Throws:</i> For the first call, as specified in Error reporting. Subsequent calls throw nothing.</p>
 </blockquote>
 <pre>bool <code><a name="is_directory">is_directory</a></code>(file_status s) noexcept;</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>s.type() == directory_file</code></p>
+ <p><i>Returns:</i> <code>s.type() == directory_file</code></p>
 </blockquote>
 <pre><code>bool <a name="is_directory2">is_directory</a>(const path&amp; p);
 bool <a name="is_directory3">is_directory</a>(const path&amp; p, system::error_code&amp; ec) noexcept;</code></pre>
@@ -2647,8 +2425,7 @@
 <pre><code>bool <a name="is_empty">is_empty</a>(const path&amp; p);
 bool <a name="is_empty2">is_empty</a></a>(const path&amp; p, system::error_code&amp; ec);</code></pre>
 <blockquote>
- <p><i>Effects:</i> Determines <code>file_status s</code>, as if by <code>
- status(p, ec)</code>.</p>
+ <p><i>Effects:</i> Determines <code>file_status s</code>, as if by <code>status(p, ec)</code>.</p>
   <p><i>Returns:</i> <code>is_directory(s)<br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ?
   directory_iterator(p) == directory_iterator()<br>
@@ -2656,33 +2433,22 @@
 </blockquote>
 <pre>bool <code><a name="is_regular_file">is_regular_file</a></code>(file_status s) noexcept;</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>s.type() == regular_file</code></p>
+ <p><i>Returns:</i> <code>s.type() == regular_file</code></p>
 </blockquote>
 <pre><code>bool <a name="is_regular_file2">is_regular_file</a>(const path&amp; p);</code></pre>
 <blockquote>
   <p><i>Returns:</i> <code>is_regular_file(status(p))</code>.</p>
- <p><i>Throws:</i> <code>filesystem_error</code>
- if <code>status(p)</code> would throw <code>filesystem_error.</code></p>
+ <p><i>Throws:</i> <code>filesystem_error</code> if <code>status(p)</code> would throw <code>filesystem_error.</code></p>
   </blockquote>
 <pre><code>bool <a name="is_regular_file3">is_regular_file</a>(const path&amp; p, system::error_code&amp; ec) noexcept;</code></pre>
 <blockquote>
- <p><i>Effects:</i> Sets <code>ec</code> as if by <code>status(p, ec)</code>. [<i>Note:</i>
- <code>status_error</code>,
- <code>file_not_found</code>
- and
- <code>type_unknown</code>
- cases set <code>ec</code>
- to error values. To distinguish between cases, call the <code>
- status</code>
- function directly. <i>-- end
+ <p><i>Effects:</i> Sets <code>ec</code> as if by <code>status(p, ec)</code>. [<i>Note:</i> <code>status_error</code>, <code>file_not_found</code> and <code>type_unknown</code> cases set <code>ec</code> to error values. To distinguish between cases, call the <code>status</code> function directly. <i>-- end
   note</i>] </p>
   <p><i>Returns:</i> <code>is_regular_file(status(p, ec))</code>.</p>
 </blockquote>
 <pre>bool <a name="is_other">is_other</a>(file_status s) noexcept;</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>return exists(s) &amp;&amp; !is_regular_file(s) &amp;&amp; !is_directory(s) &amp;&amp; !is_symlink(s)</code></p>
+ <p><i>Returns:</i> <code>return exists(s) &amp;&amp; !is_regular_file(s) &amp;&amp; !is_directory(s) &amp;&amp; !is_symlink(s)</code></p>
 </blockquote>
 <pre><code>bool <a name="is_other2">is_other</a>(const path&amp; p);
 bool <a name="is_other3">is_other</a>(const path&amp; p, system::error_code&amp; ec) noexcept;</code></pre>
@@ -2694,8 +2460,7 @@
 </blockquote>
 <pre>bool <a name="is_symlink">is_symlink</a>(file_status s) noexcept;</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>s.type() == symlink_file</code></p>
+ <p><i>Returns:</i> <code>s.type() == symlink_file</code></p>
 </blockquote>
 <pre><code>bool <a name="is_symlink2">is_symlink</a>(const path&amp; p);
 bool <a name="is_symlink3">is_symlink</a>(const path&amp; p, system::error_code&amp; ec) noexcept;</code></pre>
@@ -2709,27 +2474,16 @@
 std::time_t <a name="last_write_time2">last_write_time</a>(const path&amp; p<code>, system::error_code&amp; ec</code>);</pre>
 <blockquote>
   <p><i>Returns:</i> The time of last data modification of <code>p</code>, determined as if by the
- value of the <i>POSIX</i> <code>
- stat</code> structure member <code>st_mtime</code>&nbsp; obtained
- as if by <i>POSIX</i> <code>
- stat()</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ value of the <i>POSIX</i> <code>stat</code> structure member <code>st_mtime</code>&nbsp; obtained
+ as if by <i>POSIX</i> <code>stat()</code>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>void <a name="last_write_time3">last_write_time</a>(const path&amp; p, const std::time_t new_time);
 void <a name="last_write_time4">last_write_time</a>(const path&amp; p, const std::time_t new_time<code>, system::error_code&amp; ec</code>);</pre>
 <blockquote>
   <p><i>Effects:</i> Sets the time of last data modification of the file
- resolved to by <code>p</code>
- to <code>new_time</code>, as if by <i>POSIX</i> <code>
- stat()</code>
- followed by <i>POSIX</i>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/utime.html">
- <code>utime()</code></a>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ resolved to by <code>p</code> to <code>new_time</code>, as if by <i>POSIX</i> <code>stat()</code> followed by <i>POSIX</i> utime().</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   <p>[<i>Note:</i> A postcondition of <code>last_write_time(p) ==
   new_time</code> is not specified since it might not hold for file systems
   with coarse time granularity. <i>-- end note</i>]</p>
@@ -2739,11 +2493,7 @@
 <blockquote>
   <p dir="ltr">
   <i>Requires:</i> <code>!((prms &amp; add_perms) &amp;&amp; (prms &amp; remove_perms))</code>.</p>
- <p dir="ltr"><i>Effects:</i> Applies the effective permissions bits from <code>
- prms</code> to the file <code>p</code> resolves to, as if by <i>POSIX</i>
- <code>
- <a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchmodat.html">
- fchmodat()</a></code>. The effective permission bits are determined as
+ <p dir="ltr"><i>Effects:</i> Applies the effective permissions bits from <code>prms</code> to the file <code>p</code> resolves to, as if by <i>POSIX</i> <code>fchmodat()</code>. The effective permission bits are determined as
   specified by the following table. </p>
   <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
     <tr>
@@ -2757,22 +2507,16 @@
     <tr>
       <td><code>add_perms</code></td>
       <td>
- <p dir="ltr"><code>status(p).permissions() | (prms &amp;
- perms_mask)</code>
- </td>
+ <p dir="ltr"><code>status(p).permissions() | (prms &amp; perms_mask)</code> </td>
     </tr>
     <tr>
       <td><code>remove_perms</code></td>
- <td><code>status(p)</code><code>.permissions() &amp; ~(prms &amp;
- perms_mask)
- </code> </td>
+ <td><code>status(p)</code><code>.permissions() &amp; ~(prms &amp; perms_mask) </code></td>
     </tr>
   </table>
   <p>[<i>Note:</i> Conceptually permissions are viewed as bits, but the actual
   implementation may use some other mechanism. -- <i>end note</i>]</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>path <a name="read_symlink">read_symlink</a>(const path&amp; p);
 path read_symlink(const path&amp; p, system::error_code&amp; ec);</pre>
@@ -2780,9 +2524,7 @@
   <p dir="ltr"><i>Returns:</i>&nbsp; If <code>p</code> resolves to a symbolic
   link, a <code>path</code> object containing the contents of that symbolic
   link. Otherwise an empty <code>path</code> object.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>. [<i>Note:</i> It is an error if <code>p</code> does not
+ <p><i>Throws:</i> As specified in Error reporting. [<i>Note:</i> It is an error if <code>p</code> does not
   resolve to a symbolic link. <i>-- end note</i>]</p>
 </blockquote>
 <pre>bool <a name="remove">remove</a>(const path&amp; p);
@@ -2790,8 +2532,7 @@
 <blockquote>
   <p><i>Effects:</i>&nbsp; If <code>exists(symlink_status(p,ec))</code>, it is
   removed
- as if by<i> POSIX </i><code>
- remove()</code>.</p>
+ as if by<i> POSIX </i><code>remove()</code>.</p>
   <blockquote>
   <p>[<i>Note:</i> A symbolic link is itself removed, rather than the file it
   resolves to being removed. <i>-- end note</i>]</p>
@@ -2799,34 +2540,26 @@
   <p><i>Postcondition:</i> <code>!exists(symlink_status(p))</code>.</p>
   <p><i>Returns:</i>&nbsp; <code>false</code> if p did not exist in the first
   place, otherwise <code>true</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>uintmax_t <a name="remove_all">remove_all</a>(const path&amp; p);
 uintmax_t <a name="remove_all2">remove_all</a>(const path&amp; p, system::error_code&amp; ec);</pre>
 <blockquote>
   <p><i>Effects:</i>&nbsp; Recursively deletes the contents of p if it exists,
   then deletes file <code>p</code> itself,
- as if by<i> POSIX </i><code>
- remove()</code>.</p>
+ as if by<i> POSIX </i><code>remove()</code>.</p>
   <blockquote>
   <p>[<i>Note:</i> A symbolic link is itself removed, rather than the file it
   resolves to being removed. <i>-- end note</i>]</p>
   </blockquote>
   <p><i>Postcondition:</i> <code>!exists(p)</code></p>
   <p><i>Returns:</i> The number of files removed.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>void <a name="rename">rename</a>(const path&amp; old_p, const path&amp; new_p);
 void <a name="rename2">rename</a>(const path&amp; old_p, const path&amp; new_p, system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Effects:</i> Renames <code>old_p</code> to <code>new_p</code>, as if by
- <i>POSIX</i> <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/rename.html">
- rename()</a></code>.</p>
+ <p><i>Effects:</i> Renames <code>old_p</code> to <code>new_p</code>, as if by <i>POSIX</i> <code>rename()</code>.</p>
   <blockquote>
   <p>[<i>Note:</i> If <code>old_p</code> and <code>new_p</code> resolve to the
   same existing file, no action is taken. Otherwise, if <code>new_p</code> resolves to an
@@ -2834,39 +2567,24 @@
   existing directory, it is removed if empty on POSIX but is an error on Windows. A symbolic link is itself renamed, rather than
   the file it resolves to being renamed. <i>-- end note</i>]</p>
   </blockquote>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>void <a name="resize_file">resize_file</a>(const path&amp; p, uintmax_t new_size);
 void <a name="resize_file2">resize_file</a>(const path&amp; p, uintmax_t new_size, system::error_code&amp; ec);</pre>
 <blockquote>
 <p><i>Postcondition:</i> <code>file_size() == new_size</code>.</p>
-<p><i>Throws:</i> As specified in
-<a href="#Error-reporting">
-Error reporting</a>.</p>
+<p><i>Throws:</i> As specified in Error reporting.</p>
   <p><i>Remarks:</i> Achieves its postconditions as if by
- POSIX <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/truncate.html">
- truncate()</a></code>.</p>
+ POSIX <code>truncate()</code>.</p>
 </blockquote>
 <pre>space_info <a name="space">space</a>(const path&amp; p);
 space_info <a name="space2">space</a>(const path&amp; p, system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Returns:</i> An object of type <code>
- space_info</code>. The value of the <code>space_info</code> object is determined as if by
- using <i>POSIX</i> <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/statvfs.html" style="text-decoration: none">
- statvfs()</a></code> to obtain a <i>POSIX</i> struct <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/statvfs.h.html" style="text-decoration: none">
- statvfs</a></code>, and then multiplying its <code>f_blocks</code>, <code>
- f_bfree</code>, and <code>f_bavail</code> members by its <code>f_frsize</code>
- member, and assigning the results to the <code>capacity</code>, <code>free</code>,
+ <p><i>Returns:</i> An object of type <code>space_info</code>. The value of the <code>space_info</code> object is determined as if by
+ using <i>POSIX</i> <code>statvfs()</code> to obtain a <i>POSIX</i> struct <code>statvfs</code>, and then multiplying its <code>f_blocks</code>, <code>f_bfree</code>, and <code>f_bavail</code> members by its <code>f_frsize</code> member, and assigning the results to the <code>capacity</code>, <code>free</code>,
   and <code>available</code> members respectively. Any members for which the
   value cannot be determined shall be set to -1.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>file_status <a name="status">status</a>(const path&amp; p);</pre>
 <blockquote>
@@ -2880,9 +2598,7 @@
   </blockquote>
   <p><i>Returns:</i> See above.</p>
   <p><i>Throws:</i> <code>filesystem_error</code>.
-[<i>Note:</i> <code>result</code> values of <code>
- file_status(file_not_found)</code>and <code>
- file_status(type_unknown)</code> are not considered failures and do not
+[<i>Note:</i> <code>result</code> values of <code>file_status(file_not_found)</code>and <code>file_status(type_unknown)</code> are not considered failures and do not
   cause an exception to be
 thrown.<i> -- end note</i>] </p>
   </blockquote>
@@ -2891,15 +2607,12 @@
   <p><i>Effects: </i></p>
   <blockquote>
     <p>If possible, determines the attributes
- of the file
- <code>p</code> resolves to, as if by<i> POSIX </i> <code>
- stat()</code>.</p>
+ of the file <code>p</code> resolves to, as if by<i> POSIX </i><code>stat()</code>.</p>
       If, during attribute determination, the underlying file system API reports
     an error, sets <code>ec</code> to indicate the specific error reported.
     Otherwise, <code>ec.clear()</code>.<blockquote>
       <p>[<i>Note:</i> This allows users to inspect the specifics of underlying
- API errors even when the value returned by <code>status()</code> is not <code>
- file_status(status_error)</code>.&nbsp; <i>--end note</i>]</p>
+ API errors even when the value returned by <code>status()</code> is not <code>file_status(status_error)</code>.&nbsp; <i>--end note</i>]</p>
     </blockquote>
     </blockquote>
   <p><i>Returns:</i></p>
@@ -2924,11 +2637,8 @@
       file_status(status_error)</code>.</li>
     </ul>
         <blockquote>
- <p>[<i>Note:</i> These semantics distinguish between
- <code>p</code> being known not to exist,
- <code>p</code> existing but not being able to determine its attributes,
- and there being an error that prevents even knowing if
- <code>p</code> exists. These
+ <p>[<i>Note:</i> These semantics distinguish between <code>p</code> being known not to exist, <code>p</code> existing but not being able to determine its attributes,
+ and there being an error that prevents even knowing if <code>p</code> exists. These
         distinctions are important to some use cases.&nbsp;<i>--end note</i>]</p>
     </blockquote>
     <p>Otherwise,</p>
@@ -2981,24 +2691,18 @@
 </blockquote>
 <pre>bool <a name="status_known">status_known</a>(file_status s) noexcept;</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>s.type() != status_error</code></p>
+ <p><i>Returns:</i> <code>s.type() != status_error</code></p>
 </blockquote>
 <pre>file_status <a name="symlink_status">symlink_status</a>(const path&amp; p);
 file_status <a name="symlink_status2">symlink_status</a>(const path&amp; p, system::error_code&amp; ec) noexcept;</pre>
 <blockquote>
   <p><i>Effects:</i>&nbsp; Same as status(), above,
   except that the attributes
- of
- <code>p</code> are determined as if by<i> POSIX </i> <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/lstat.html">
- lstat()</a></code>.</p>
+ of <code>p</code> are determined as if by<i> POSIX </i><code>lstat()</code>.</p>
 </blockquote>
 <blockquote>
       <p><i>Returns:</i> Same as status(), above, except
- that if the attributes indicate a symbolic link, as if by <i>POSIX</i>
- <a class="external" href="http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/stat.h.html">
- S_ISLNK()</a>, return <code>file_status(symlink_file)</code>.</p>
+ that if the attributes indicate a symbolic link, as if by <i>POSIX</i> <a class="external" href="http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/stat.h.html">S_ISLNK()</a>, return <code>file_status(symlink_file)</code>.</p>
       <p><i>Remarks:</i> Pathname resolution terminates if <code>p</code> names a symbolic link.</p>
   <p><i>Throws:</i> <code>filesystem_error</code>; overload with <code>error_code&amp;</code> throws
   nothing.</p>
@@ -3010,25 +2714,17 @@
   same rules used by the operating system to resolve a path passed as the
   filename argument to standard library open functions.</p>
   <p><i>Returns:</i> The composed path.</p>
- <p><i>Postcondition:</i> For the returned path, <code>rp,</code> <code>
- rp.is_absolute()</code> is true.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
- <p>[<i>Note:</i> For <i>POSIX</i>, <code>system_complete(p)</code> has the same semantics as
- <code>complete(p, current_path())</code>.</p>
+ <p><i>Postcondition:</i> For the returned path, <code>rp,</code> <code>rp.is_absolute()</code> is true.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
+ <p>[<i>Note:</i> For <i>POSIX</i>, <code>system_complete(p)</code> has the same semantics as <code>complete(p, current_path())</code>.</p>
   <p><a name="windows_effects">For <i>Windows</i></a>, <code>system_complete(p)</code> has the
- same semantics as <code>complete(ph, current_path())</code> if
- <code>p.is_absolute() || !p.has_root_name()</code> or <code>p</code> and <code>base</code> have the same
- <code>root_name()</code>.
- Otherwise it acts like <code>complete(p, kinky)</code>, where <code>kinky</code>
- is the current directory for the <code>p.root_name()</code> drive. This will
+ same semantics as <code>complete(ph, current_path())</code> if <code>p.is_absolute() || !p.has_root_name()</code> or <code>p</code> and <code>base</code> have the same <code>root_name()</code>.
+ Otherwise it acts like <code>complete(p, kinky)</code>, where <code>kinky</code> is the current directory for the <code>p.root_name()</code> drive. This will
   be the current directory of that drive the last time it was set, and thus may
   be <b>residue left over from a prior program</b> run by the command
   processor! Although these semantics are often useful, they are also very
   error-prone.</p>
- <p>See <a href="#complete_note">
- <i>complete()</i> note</a> for usage suggestions. <i>-- end note</i>]</p>
+ <p>See complete() note for usage suggestions. <i>-- end note</i>]</p>
 </blockquote>
 <pre>path <a name="temp_directory_path">temp_directory_path</a>();
 path temp_directory_path(system::error_code&amp; ec);</pre>
@@ -3040,8 +2736,7 @@
   <p><i>POSIX:</i> The path supplied by the first environment variable found in the
   list TMPDIR, TMP, TEMP, TEMPDIR. If none of these are found, <code>&quot;/tmp&quot;</code>.</p>
   <p><i>Windows:</i> The path reported by the <i>Windows</i> <code>GetTempPath</code> API function.</p>
- <p><i>Throws:</i> As specified in <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   <p>[<i>Note: </i>The <code>temp_directory_path()</code> name was chosen to emphasize that the return is a
   path, not just a single directory name.&nbsp; <i>-- end note</i>]</p>
 </blockquote>
@@ -3059,13 +2754,9 @@
   <p><i>Returns:</i> A path identical to <code>model</code>, except that each
   occurrence of a percent sign character is replaced by a random hexadecimal
   digit character in the range 0-9, a-f.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   <p><i>Remarks:</i> Implementations are encouraged to obtain the required
- randomness via a
- <a href="http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator">
- cryptographically secure pseudo-random number generator</a>, such as one
+ randomness via a cryptographically secure pseudo-random number generator, such as one
   provided by the operating system. [<i>Note</i>: Such generators may block
   until sufficient entropy develops. <i>--end note</i>]</p>
 </blockquote>
@@ -3134,9 +2825,7 @@
 
 <h2><a name="Path-decomposition-table">Path decomposition table</a></h2>
 <p>The table is generated by a program compiled with the Boost implementation.</p>
-<p>Shaded entries indicate cases where <i>POSIX</i> and <i>Windows</i>
-implementations yield different results. The top value is the
-<i>POSIX</i> result and the bottom value is the <i>Windows</i> result. <br>
+<p>Shaded entries indicate cases where <i>POSIX</i> and <i>Windows</i> implementations yield different results. The top value is the <i>POSIX</i> result and the bottom value is the <i>Windows</i> result. <br>
 <table border="1" cellspacing="0" cellpadding="5">
 <p>
 <tr><td><b>Constructor<br>argument</b></td>
@@ -3640,8 +3329,7 @@
 <p>The Windows API has many functions that also have Unicode versions to permit
 an extended-length path for a maximum total path length of 32,767 characters.
 ... To specify an extended-length path, use the <b>&quot;\\?\&quot; prefix</b>. For
-example, &quot;\\?\D:\<em>very long path</em>&quot;.&nbsp;
-<i>[C++ string literals require backslashes be doubled, of course.]</i></p>
+example, &quot;\\?\D:\<em>very long path</em>&quot;.&nbsp; <i>[C++ string literals require backslashes be doubled, of course.]</i></p>
 </blockquote>
 <p>Because most Boost.Filesystem operational functions just pass the contents of
 a class path object to the Windows API, they do work with the extended-length
@@ -3668,9 +3356,7 @@
 through to completion. She gave me the strength to continue after a difficult
 year of cancer treatment in the middle of it all.</p>
 <p>Many people contributed technical comments, ideas, and suggestions to the
-Boost Filesystem Library. See
-<a href="http://www.boost.org/libs/filesystem/doc/index.htm#Acknowledgements">
-http://www.boost.org/libs/filesystem/doc/index.htm#Acknowledgements>.</p>
+Boost Filesystem Library. See
http://www.boost.org/libs/filesystem/doc/index.htm#Acknowledgements.</p>
 <p>Dietmar Kuehl contributed the original Boost Filesystem Library directory_iterator design. Peter Dimov, Walter Landry, Rob Stewart, and Thomas
 Witt were particularly helpful in refining the library.</p>
 <p>The create_directories, extension, basename, and replace_extension functions
@@ -3689,17 +3375,12 @@
     <td width="84%">ISO/IEC 9945:2003, IEEE&nbsp;Std&nbsp;1003.1-2001, and The Open Group
     Base Specifications, Issue 6. Also known as The Single Unix<font face="Times New Roman">®
     Specification, Version 3. Available from each of the organizations involved
- in its creation. For example, read online or download from
- <a href="http://www.unix.org/single_unix_specification/">
- www.unix.org/single_unix_specification/</a>.</font> The ISO JTC1/SC22/WG15 -
- POSIX homepage is <a href="http://www.open-std.org/jtc1/sc22/WG15/">
- www.open-std.org/jtc1/sc22/WG15/</a></td>
+ in its creation. For example, read online or download from www.unix.org/single_unix_specification/.</font> The ISO JTC1/SC22/WG15 -
+ POSIX homepage is www.open-std.org/jtc1/sc22/WG15/</td>
   </tr>
   <tr>
     <td width="16%" valign="top">[Abrahams]</td>
- <td width="84%">Dave Abrahams, Error and Exception Handling,
- <a href="http://www.boost.org/more/error_handling.html">
- www.boost.org/more/error_handling.html</a></td>
+ <td width="84%">Dave Abrahams, Error and Exception Handling, www.boost.org/more/error_handling.html</td>
   </tr>
 </table>
 <hr>
@@ -3712,6 +3393,4 @@
 <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->20 March 2012<!--webbot bot="Timestamp" endspan i-checksum="27254" --></font></p>
 
 
-</body>
-
-</html>
\ No newline at end of file
+</body></html>
\ No newline at end of file

Modified: trunk/libs/filesystem/doc/release_history.html
==============================================================================
--- trunk/libs/filesystem/doc/release_history.html (original)
+++ trunk/libs/filesystem/doc/release_history.html 2012-03-31 11:53:24 EDT (Sat, 31 Mar 2012)
@@ -52,6 +52,12 @@
   <li>Fix #3737,
   Boost.Filesystem does not compile on Windows Mobile. On Windows, &lt;sys/stat.h&gt;
   is no longer included.</li>
+ <li>Fix #4065,
+ Boost Filesystem lexicographic path comparison inconsistent. This required
+ multiple source code bug fixes and code cleanup, correcting problems not
+ related to lexicographical issues.</li>
+ <li>Add class path member function <code>compare</code> for consistency with
+ std::string.</li>
 </ul>
 
 <h2>1.49.0</h2>
@@ -136,7 +142,7 @@
 </ul>
 <hr>
 <p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->27 March, 2012<!--webbot bot="Timestamp" endspan i-checksum="28828" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->31 March, 2012<!--webbot bot="Timestamp" endspan i-checksum="28817" --></p>
 <p>© Copyright Beman Dawes, 2011</p>
 <p> Use, modification, and distribution are subject to the Boost Software
 License, Version 1.0. See <a href="http://www.boost.org/LICENSE_1_0.txt">

Modified: trunk/libs/filesystem/doc/src/source.html
==============================================================================
--- trunk/libs/filesystem/doc/src/source.html (original)
+++ trunk/libs/filesystem/doc/src/source.html 2012-03-31 11:53:24 EDT (Sat, 31 Mar 2012)
@@ -68,6 +68,7 @@
     format observers</a><br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#path-generic-format-observers"><code>path</code> generic
     format observers</a><br>
+&nbsp;&nbsp;&nbsp; path compare<br>
 &nbsp;&nbsp;&nbsp; path decomposition<br>
 &nbsp;&nbsp;&nbsp; path query<br>
 &nbsp;&nbsp;&nbsp;&nbsp;path iterators<br>
@@ -336,11 +337,14 @@
 directory. The dot dot filename names the parent directory.</p>
 <h2><a name="Header-filesystem-synopsis">Header <code>&lt;$HEADER;&gt;</code> synopsis</a></h2>
 <pre>$NAMESPACE_BEGIN;
- class path;
-
- void swap(path&amp; lhs, path&amp; rhs);
+ class path;
+$if $TARGET; == BOOST
     bool lexicographical_compare(path::iterator first1, path::iterator last1,
- path::iterator first2, path::iterator last2);
+ path::iterator first2, path::iterator last2);
+
+$endif
+
+<pre> void swap(path&amp; lhs, path&amp; rhs);
     std::size_t hash_value(const path&amp; p);
 
     bool operator==(const path&amp; lhs, const path&amp; rhs);
@@ -526,8 +530,7 @@
 $NAMESPACE_END;</pre>
 <h2><a name="Error-reporting">Error reporting</a></h2>
 <p>Filesystem library functions often provide two overloads, one that
-throws an exception to report file system errors, and another that sets an
-<code>error_code</code>.</p>
+throws an exception to report file system errors, and another that sets an <code>error_code</code>.</p>
 <blockquote>
 <p>[<i>Note:</i> This supports two common use cases:</p>
 <ul>
@@ -542,9 +545,7 @@
 </ul>
   <p><i>--end note</i>]</p>
 </blockquote>
-<p>Functions <b>not</b> having an argument of type
-<code>system::error_code&amp;</code>
-report errors as follows, unless otherwise specified:</p>
+<p>Functions <b>not</b> having an argument of type <code>system::error_code&amp;</code> report errors as follows, unless otherwise specified:</p>
   <ul>
   <li>When a call by the
   implementation to an operating system or other underlying API results in an
@@ -557,8 +558,7 @@
 &nbsp;</li>
   <li>Destructors throw nothing.</li>
   </ul>
- <p>Functions having an argument of type
-<code>system::error_code&amp;</code> report errors as follows, unless otherwise
+ <p>Functions having an argument of type <code>system::error_code&amp;</code> report errors as follows, unless otherwise
   specified:</p>
 <ul>
   <li>If a call by the
@@ -580,8 +580,7 @@
 pathname is not necessarily valid for the current operating
 system or for a particular file system.</p>
 <blockquote>
-<p>[<i>Example:</i> A long path name on Windows
-is an example of an innocuous appearing path that is not actually valid. <i>--
+<p>[<i>Example:</i> A long path name on Windows is an example of an innocuous appearing path that is not actually valid. <i>--
 end example</i>]</p>
 </blockquote>
 <pre>$NAMESPACE_BEGIN;
@@ -660,6 +659,11 @@
         const u16string generic_u16string() const; // ditto
         const u32string generic_u32string() const; // ditto
 
+ // compare
+ int compare(const path&amp; p) const noexcept;
+ int compare(const std::string&amp; s) const;
+ int compare(const value_type* s) const;
+
         // decomposition
         path root_name() const;
         path root_directory() const;
@@ -699,18 +703,15 @@
       };
 
 $NAMESPACE_END;</pre>
-<p><code><a name="value_type">value_type</a></code> is an implementation-defined
-<code>typedef</code> for the
+<p><code><a name="value_type">value_type</a></code> is an implementation-defined <code>typedef</code> for the
 character type used by the operating system to represent pathnames.</p>
-<p>Member functions described as returning <code>const string</code>, <code>
-const wstring</code>, <code>const u16string</code>, or <code>const u32string</code> are permitted to return <code>const string&amp;</code>, <code>const
+<p>Member functions described as returning <code>const string</code>, <code>const wstring</code>, <code>const u16string</code>, or <code>const u32string</code> are permitted to return <code>const string&amp;</code>, <code>const
 wstring&amp;</code>, <code>const u16string&amp;</code>, or <code>const u32string&amp;</code>,
 respectively.</p>
 <blockquote>
 <p>[<i>Note:</i> This allows implementations to avoid unnecessary copies when no
 conversion is required.
-Return-by-value is specified as
-<code>const</code> to ensure programs won't break if moved to a return-by-reference
+Return-by-value is specified as <code>const</code> to ensure programs won't break if moved to a return-by-reference
 implementation. <i>--
 end note</i>]</p>
 </blockquote>
@@ -774,20 +775,16 @@
 they use the same format
 for both regular file and directory pathnames. <i>--end note</i>]</p>
 
-<p>[<i>Example:</i>
-On OpenVMS, a path
+<p>[<i>Example:</i> On OpenVMS, a path
 constructed from <code>&quot;/cats/jane&quot;</code> would considered a regular file
 path, and have a native format of <code>&quot;[CATS]JANE&quot;</code>, while a
 path constructed from <code>&quot;/cats/jane/&quot;</code> would be considered a
-directory path, and have a native format of <code>&quot;[CATS.JANE]&quot;</code>.
-<i>--end example</i>]</p>
+directory path, and have a native format of <code>&quot;[CATS.JANE]&quot;</code>. <i>--end example</i>]</p>
 
 </blockquote>
 <h4><a name="path-Conversions-to-generic-format"><code>path</code> Conversions
 to generic format</a></h4>
-<p>Generic format observer
-functions return strings formatted according to the
-generic pathname format. The conversion
+<p>Generic format observer functions return strings formatted according to the generic pathname format. The conversion
 from generic to native formats is implementation defined.</p>
 <blockquote>
 <p>[<i>Note:</i> For POSIX, no conversion is performed. For Windows, backslashes are converted to
@@ -796,38 +793,23 @@
 <h4><a name="path-Encoding-conversions"><code>path</code> Encoding conversions</a></h4>
 <p>If the value type of member function arguments that are character sequences
 representing paths is not <code>value_type</code>,
-and no <code>cvt</code> argument is supplied, conversion to <code>value_type</code>
-occurs using an imbued locale. This imbued locale is initialized with a <code>
-codecvt</code> facet appropriate for the operating system.</p>
-<blockquote>
-<p>For Apple OS X implementations, <code>path::value_type</code>
-is <code>char</code>. The default imbued locale provides a UTF-8 <code>codecvt</code>
-facet. [<i>Rationale:</i> &quot;All BSD system functions expect their string
-parameters to be in UTF-8 encoding and nothing else.&quot; See
-<a href="http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/FileEncodings.html">
-Apple docs</a>. <i>-- end rationale</i>]</p>
-<p>For Windows-like implementations, including
-MinGW, <code>path::value_type</code> is <code>
-wchar_t</code>. The default imbued locale provides a <code>codecvt</code> facet
-that invokes Windows <code>MultiByteToWideChar</code> or <code>
-WideCharToMultiByte</code> API with a codepage of <code>CP_THREAD_ACP</code>
-if Windows <code>AreFileApisANSI()</code>is true, otherwise codepage <code>
-CP_OEMCP</code>. [<i>Rationale:</i> this is the current behavior of C and C++
+and no <code>cvt</code> argument is supplied, conversion to <code>value_type</code> occurs using an imbued locale. This imbued locale is initialized with a <code>codecvt</code> facet appropriate for the operating system.</p>
+<blockquote>
+<p>For Apple OS X implementations, <code>path::value_type</code> is <code>char</code>. The default imbued locale provides a UTF-8 <code>codecvt</code> facet. [<i>Rationale:</i> &quot;All BSD system functions expect their string
+parameters to be in UTF-8 encoding and nothing else.&quot; See Apple docs. <i>-- end rationale</i>]</p>
+<p>For Windows-like implementations, including MinGW, <code>path::value_type</code> is <code>wchar_t</code>. The default imbued locale provides a <code>codecvt</code> facet
+that invokes Windows <code>MultiByteToWideChar</code> or <code>WideCharToMultiByte</code> API with a codepage of <code>CP_THREAD_ACP</code> if Windows <code>AreFileApisANSI()</code>is true, otherwise codepage <code>CP_OEMCP</code>. [<i>Rationale:</i> this is the current behavior of C and C++
 programs that perform file operations using narrow character string to identify
 paths. Changing this in the Filesystem library would be too surprising,
 particularly where user input is involved. <i>-- end rationale</i>]</p>
-<p>For all other implementations, including<b> </b>Linux, <code>path::value_type</code>
-is <code>char</code>. The default imbued locale is <code>std::locale(&quot;&quot;)</code>.
+<p>For all other implementations, including<b> </b>Linux, <code>path::value_type</code> is <code>char</code>. The default imbued locale is <code>std::locale(&quot;&quot;)</code>.
 [<i>Rationale:</i> ISO C specifies this as &quot;the locale-specific native
 environment&quot;, while POSIX says it &quot;Specifies an implementation-defined native
 environment.&quot; <i>-- end rationale</i>]</p>
 </blockquote>
 <h3><a name="path-Requirements"><code>path</code> Requirements</a></h3>
-<p>Template parameters named <code><a name="InputIterator">InputIterator</a></code>
-are required meet the
-requirements for a C++ standard library <code>RandomIterator</code>
-compliant iterator. The iterator's value type is required to be <code>char</code>, <code>
- wchar_t</code>, <code>char16_t</code>, or <code>char32_t</code>.</p>
+<p>Template parameters named <code><a name="InputIterator">InputIterator</a></code> are required meet the
+requirements for a C++ standard library <code>RandomIterator</code> compliant iterator. The iterator's value type is required to be <code>char</code>, <code>wchar_t</code>, <code>char16_t</code>, or <code>char32_t</code>.</p>
 <p>Template parameters named <code><a name="Source">Source</a></code> are required to be one of:</p>
 <ul>
   <li>A container with a value type of <code>char</code>, <code>
@@ -891,12 +873,9 @@
   preferred
   directory separator is implementation-defined.</p>
 <blockquote>
- <p align="left">[<i>Note: </i>For POSIX-like implementations, including<b> </b>
- Unix variants, Linux, and Mac OS X, the preferred directory separator is a
+ <p align="left">[<i>Note: </i>For POSIX-like implementations, including<b> </b>Unix variants, Linux, and Mac OS X, the preferred directory separator is a
     single forward slash.</p>
- <p align="left">For Windows-like implementations, including
- Cygwin and
- MinGW, the preferred directory
+ <p align="left">For Windows-like implementations, including Cygwin and MinGW, the preferred directory
     separator is a single backslash.<i>--end note</i>]</p>
       </blockquote>
 <pre>path&amp; operator/=(const path&amp; p);</pre>
@@ -961,8 +940,7 @@
 <pre>path&amp; <a name="path-remove_filename">remove_filename</a>();</pre>
 <blockquote>
   <p><i>Returns: </i>As if, <code>*this = parent_path();</code></p>
- <p>[<i>Note:</i> This function is needed to efficiently implement <code>
- directory_iterator</code>. It is exposed to allow additional uses. The actual
+ <p>[<i>Note:</i> This function is needed to efficiently implement <code>directory_iterator</code>. It is exposed to allow additional uses. The actual
   implementation may be much more efficient than <code>*this = parent_path()</code>&nbsp; <i>-- end
   note</i>]</p>
 </blockquote>
@@ -982,16 +960,12 @@
 </blockquote>
 <pre><code>void <a name="path-swap">swap</a>(path&amp; rhs) noexcept;</code></pre>
 <blockquote>
- <p><i>Effects:</i>
- Swaps the contents of the two paths.</p>
- <p><i>Complexity: </i>
- constant time.</p>
+ <p><i>Effects:</i> Swaps the contents of the two paths.</p>
+ <p><i>Complexity: </i>constant time.</p>
 </blockquote>
 
-<h3> <a name="path-native-format-observers"><code><font size="4">path</font></code>
-native format observers</a></h3>
-<p>The string returned by all native format observers is in the
-native pathname format.</p>
+<h3> <a name="path-native-format-observers"><code><font size="4">path</font></code> native format observers</a></h3>
+<p>The string returned by all native format observers is in the native pathname format.</p>
 <pre>const string_type&amp; <a name="native">native</a>() const noexcept;</pre>
 <blockquote>
 <p><i>Returns:</i> <code>pathname</code>.</p>
@@ -1004,8 +978,7 @@
 String <a name="string-template">string</a>(const codecvt_type&amp; cvt=codecvt()) const;</pre>
 <blockquote>
   <p><i>Returns:</i> <code>pathname</code>.</p>
-<p><i>Remarks:</i> If <code>string_type</code> is a different type than <code>
-String</code>, conversion is performed by <code>cvt</code>.</p>
+<p><i>Remarks:</i> If <code>string_type</code> is a different type than <code>String</code>, conversion is performed by <code>cvt</code>.</p>
 </blockquote>
 <pre>const string <a name="string">string</a>(const codecvt_type&amp; cvt=codecvt()) const;
 const wstring <a name="wstring">wstring</a>(const codecvt_type&amp; cvt=codecvt()) const;
@@ -1016,25 +989,18 @@
 <p><i>Remarks:</i> If <code>string_type</code> is a different type than
 function's return type, conversion is performed by <code>cvt</code>.</p>
 <p>If <code>string_type</code> is the same type as the
-function's return type, the function is permitted to return by <code>const&amp;</code>
-rather than <code>const</code> value. [<i>Note:</i> For POSIX, this occurs for
-<code>string()</code>, for Windows, <code>wstring()</code>. <i>--end note</i>]</p>
+function's return type, the function is permitted to return by <code>const&amp;</code> rather than <code>const</code> value. [<i>Note:</i> For POSIX, this occurs for <code>string()</code>, for Windows, <code>wstring()</code>. <i>--end note</i>]</p>
 </blockquote>
 
-<h3> <a name="path-generic-format-observers"><code><font size="4">path</font></code>
-generic format observers</a></h3>
-<p>The string returned by all generic format observers is in the
-generic pathname format.</p>
+<h3> <a name="path-generic-format-observers"><code><font size="4">path</font></code> generic format observers</a></h3>
+<p>The string returned by all generic format observers is in the generic pathname format.</p>
 <p>[<i>Note:</i> For POSIX, no conversion occurs, since the native format and
-generic format are the same. For Windows, backslashes are converted to slashes
-<i>--end note</i>]</p>
+generic format are the same. For Windows, backslashes are converted to slashes <i>--end note</i>]</p>
 <pre>template &lt;class String&gt;
 String <a name="generic_string-template">generic_string</a>(const codecvt_type&amp; cvt=codecvt()) const;</pre>
 <blockquote>
   <p><i>Returns:</i> <code>pathname</code>.</p>
-<p><i>Remarks:</i> If <code>string_type</code> is a different type than <code>
-String</code>, conversion is performed by
-<code>cvt</code>.</p>
+<p><i>Remarks:</i> If <code>string_type</code> is a different type than <code>String</code>, conversion is performed by <code>cvt</code>.</p>
 </blockquote>
 <pre>const string <a name="generic_string">generic_string</a>(const codecvt_type&amp; cvt=codecvt()) const;
 const wstring <a name="generic_wstring">generic_wstring</a>(const codecvt_type&amp; cvt=codecvt()) const;
@@ -1046,28 +1012,38 @@
 function's return type, conversion is performed by <code>cvt</code>.</p>
 <p>If <code>string_type</code> is of the same type as the
 function's return type, and the generic format is the same as the native format,
-the function is permitted to return by <code>const&amp;</code> rather than <code>
-const</code> value. [<i>Note:</i> For POSIX, this occurs for <code>string()</code>.
-It never occurs for Windows, because backslashes must be converted to slashes.
-<i>--end note</i>]</p>
+the function is permitted to return by <code>const&amp;</code> rather than <code>const</code> value. [<i>Note:</i> For POSIX, this occurs for <code>string()</code>.
+It never occurs for Windows, because backslashes must be converted to slashes. <i>--end note</i>]</p>
 </blockquote>
 
-<h3> <a name="path-decomposition"> <code><font size="4">path</font></code>
-decomposition</a></h3>
-<p><span style="background-color: #E0E0E0"><i>See the
-Path decomposition table for examples
-for values returned by decomposition functions. The
-Tutorial may also be
+<h3> <a name="path-compare"><code>path</code> compare</a></h3>
+<pre>int compare(const path&amp; p) const noexcept;</pre>
+<blockquote>
+ <p><i>Returns:</i> A value less than 0 if the elements of <code>*this</code> are lexicographically less than the elements of <code>p</code>, otherwise a
+ value greater than 0 if the elements of <code>*this</code> are
+ lexicographically greater than the elements of <code>p</code>, otherwise 0.</p>
+ <p>Remark: The elements are determined as if by iteration over the half-open
+ range [<code>begin()</code>, <code>end()</code>) for <code>*this</code> and&nbsp; <code>p</code>.</p>
+</blockquote>
+<pre>int compare(const std::string&amp; s) const</pre>
+<blockquote>
+ <p><i>Returns:</i> <code>compare(path(s))</code>.</p>
+</blockquote>
+<pre>int compare(const value_type* s) const</pre>
+<blockquote>
+ <p><i>Returns:</i> <code>compare(path(s))</code>.</p>
+</blockquote>
+<h3> <a name="path-decomposition"> <code><font size="4">path</font></code> decomposition</a></h3>
+<p><span style="background-color: #E0E0E0"><i>See the Path decomposition table for examples
+for values returned by decomposition functions. The Tutorial may also be
 helpful.</i></span></p>
 <pre>path <a name="path-root_name">root_name</a>() const;</pre>
 <blockquote>
-<p><i>Returns:</i> <i>root-name,</i> if <code>pathname</code> includes <i>
-root-name</i>, otherwise <code>path()</code>. </p>
+<p><i>Returns:</i> <i>root-name,</i> if <code>pathname</code> includes <i>root-name</i>, otherwise <code>path()</code>. </p>
 </blockquote>
 <pre>path <a name="path-root_directory">root_directory</a>() const;</pre>
 <blockquote>
-<p><i>Returns:</i> <i>root-directory</i>, if <code>pathname</code> includes <i>
-root-directory</i>, otherwise <code>path()</code>.</p>
+<p><i>Returns:</i> <i>root-directory</i>, if <code>pathname</code> includes <i>root-directory</i>, otherwise <code>path()</code>.</p>
 <p>If <i>root-directory</i> is composed of <i>slash name</i>, <i>slash</i> is
 excluded from the returned string.</p>
 </blockquote>
@@ -1077,17 +1053,13 @@
 </blockquote>
 <pre>path <a name="path-relative_path">relative_path</a>() const;</pre>
 <blockquote>
-<p><i>Returns:</i> A <code>path</code> composed from <code>pathname</code>, if <code>
-!empty()</code>, beginning
+<p><i>Returns:</i> A <code>path</code> composed from <code>pathname</code>, if <code>!empty()</code>, beginning
 with the first <i>filename</i> after <i>root-path</i>. Otherwise, <code>path()</code>.</p>
 </blockquote>
 <pre>path <a name="path-parent_path">parent_path</a>() const;</pre>
 <blockquote>
- <p><i>Returns:</i> <code>(empty() || begin() == --end()) ? path() : <i>pp</i></code>, where
- <code><i>pp</i></code> is constructed as if by
- starting with an empty <code>path</code> and successively applying <code>
- operator/=</code> for each element in the range <code>begin()</code>, <code>
- --end()</code>.</p>
+ <p><i>Returns:</i> <code>(empty() || begin() == --end()) ? path() : <i>pp</i></code>, where <code><i>pp</i></code> is constructed as if by
+ starting with an empty <code>path</code> and successively applying <code>operator/=</code> for each element in the range <code>begin()</code>, <code>--end()</code>.</p>
 </blockquote>
 <pre>path <a name="path-filename">filename</a>() const;</pre>
 <blockquote>
@@ -1104,8 +1076,7 @@
   consist solely of one or to two dots, returns
   the substring of <code>p.filename()</code> starting at its beginning and
   ending at the last dot (the dot is not included). Otherwise,
- returns <code>
- p.filename()</code>.</p>
+ returns <code>p.filename()</code>.</p>
   <p>[<i>Example:</i></p>
   <blockquote>
     <pre><code>std::cout &lt;&lt; path(&quot;/foo/bar.txt&quot;).stem();</code> // outputs &quot;<code>bar</code>&quot;
@@ -1123,8 +1094,7 @@
   <p><i>Returns:</i> if <code>p.filename()</code> contains a dot but does not
   consist solely of one or to two dots, returns
   the substring of <code>p.filename()</code> starting at the rightmost dot
- and ending at the path's end. Otherwise, returns an empty <code>path</code>
- object. </p>
+ and ending at the path's end. Otherwise, returns an empty <code>path</code> object. </p>
   <p><i>Remarks:</i> Implementations are permitted but not required to define additional
   behavior for file systems which append additional elements to extensions, such
   as alternate data streams or partitioned dataset names.</p>
@@ -1134,9 +1104,7 @@
   </blockquote>
   <p> <i>--end example</i>]</p>
   <p>[<i>Note:<b> </b></i>The dot is included in the return value so that
- it is possible to distinguish between no extension and an empty extension. See
- <a href="http://permalink.gmane.org/gmane.comp.lib.boost.devel/199744">
- http://permalink.gmane.org/gmane.comp.lib.boost.devel/199744> for more
+ it is possible to distinguish between no extension and an empty extension. See
http://permalink.gmane.org/gmane.comp.lib.boost.devel/199744 for more
   extensive rationale.&nbsp; <i>-- end note</i>]</p>
 </blockquote>
 <h3> <a name="path-query"> <code><font size="4">path</font></code> query</a></h3>
@@ -1178,11 +1146,8 @@
 </blockquote>
 <pre>bool <a name="path-is_absolute">is_absolute</a>() const;</pre>
 <blockquote>
- <p><i>Returns:</i> <code>true</code>
- if the elements of <code>root_path()</code> uniquely identify a directory, else <code>false</code>.</p>
- <p>[<i>Note:</i> On POSIX,<code>
- path(&quot;/foo&quot;).is_absolute()</code> returns <code>true</code>. On Windows, <code>
- path(&quot;/foo&quot;).is_absolute()</code> returns <code>false</code>. <i>--end note</i>]</p>
+ <p><i>Returns:</i> <code>true</code> if the elements of <code>root_path()</code> uniquely identify a directory, else <code>false</code>.</p>
+ <p>[<i>Note:</i> On POSIX,<code> path(&quot;/foo&quot;).is_absolute()</code> returns <code>true</code>. On Windows, <code>path(&quot;/foo&quot;).is_absolute()</code> returns <code>false</code>. <i>--end note</i>]</p>
 </blockquote>
 <pre>bool <a name="path-is_relative">is_relative</a>() const;</pre>
 <blockquote>
@@ -1193,8 +1158,7 @@
 <p> Path iterators iterate over the elements of the stored pathname.</p>
 <p> A <code>path::iterator</code> is a constant iterator satisfying all
 the requirements of a bidirectional iterator (C++ Std, 24.1.4 Bidirectional
-iterators [lib.bidirectional.iterators]). Its <code>value_type</code> is <code>
-path</code>.</p>
+iterators [lib.bidirectional.iterators]). Its <code>value_type</code> is <code>path</code>.</p>
   <p>Calling any non-const member function of a <code>path</code> object
   invalidates all iterators referring to elements of that object.</p>
 <p> The forward traversal order is as follows:</p>
@@ -1222,8 +1186,7 @@
 <blockquote>
   <p><i>Effects:</i> Stores <code>loc</code> as the default locale for all
   objects of type <code>path</code>.</p>
- <p><i>Returns:</i> The previous default locale for all objects of type <code>
- path</code>.</p>
+ <p><i>Returns:</i> The previous default locale for all objects of type <code>path</code>.</p>
 </blockquote>
 <pre>static const codecvt_type&amp; <a name="path-codecvt">codecvt</a>();</pre>
 <blockquote>
@@ -1233,11 +1196,9 @@
 
 $if $TARGET; == BOOST
 <h3> <a name="path-deprecated-functions"><code><font size="4"> path</font></code> deprecated functions</a></h3>
-<p> Several member functions from previous versions of <code>class path</code>
-have been deprecated, either because they have been renamed or because the
+<p> Several member functions from previous versions of <code>class path</code> have been deprecated, either because they have been renamed or because the
 functionality is no longer desirable or has become obsolete.</p>
-<p> Deprecated functions available by default; will be suppressed if <code>
-BOOST_FILESYSTEM_NO_DEPRECATED</code> is defined:</p>
+<p> Deprecated functions available by default; will be suppressed if <code>BOOST_FILESYSTEM_NO_DEPRECATED</code> is defined:</p>
 <blockquote>
   <pre>path&amp; remove_leaf() { return remove_filename(); }
 path leaf() const { return filename(); }
@@ -1245,10 +1206,9 @@
 bool has_leaf() const { return !m_path.empty(); }
 bool has_branch_path() const { return !parent_path().empty(); }</pre>
 </blockquote>
-<p> Deprecated functions not available by default; will be supplied if <code>
-BOOST_FILESYSTEM_DEPRECATED</code> is defined:</p>
+<p> Deprecated functions not available by default; will be supplied if <code>BOOST_FILESYSTEM_DEPRECATED</code> is defined:</p>
 <blockquote>
- <pre>const std::string file_string() const { return native_string(); }
+<pre>const std::string file_string() const { return native_string(); }
 const std::string directory_string() const { return native_string(); }
 const std::string native_file_string() const { return native_string(); }
 const std::string native_directory_string() const { return native_string(); }
@@ -1258,21 +1218,14 @@
 
 $endif
 
-<h3> <a name="path-non-member-functions"> <code><font size="4">path</font></code>
-non-member functions</a></h3>
-<pre>void swap( path&amp; lhs, path&amp; rhs )</pre>
-<blockquote>
- <p><i>Effects: </i><code>
- lhs.swap(rhs)</code>.</p>
-</blockquote>
+<h3> <a name="path-non-member-functions"> <code><font size="4">path</font></code> non-member functions</a></h3>
+$if $TARGET; == BOOST
   <pre>bool lexicographical_compare(path::iterator first1, path::iterator last1,
- path::iterator first2, path::iterator last2)</pre>
+ path::iterator first2, path::iterator last2);</pre>
 <blockquote>
- <p><i>Returns:</i> <code>true</code> if the sequence of <code>native()</code>
- strings for the elements defined by the range <code>[first1,last1)</code> is
+ <p><i>Returns:</i> <code>true</code> if the sequence of <code>native()</code> strings for the elements defined by the half-open range <code>[first1,last1)</code> is
   lexicographically less than the sequence of <code>native()</code> strings for
- the elements defined by the range <code>[first2,last2)</code>. Returns <code>
- false</code> otherwise.</p>
+ the elements defined by the half-open range <code>[first2,last2)</code>. Returns <code>false</code> otherwise.</p>
   <p><i>Remarks:</i> If two sequences have the same number of elements and their
   corresponding elements are equivalent, then neither sequence is
   lexicographically less than the other. If one sequence is a prefix of the
@@ -1280,28 +1233,22 @@
   sequence. Otherwise, the lexicographical comparison of the sequences yields
   the same result as the comparison of the first corresponding pair of elements
   that are not equivalent.</p>
- <pre> for ( ; first1 != last1 &amp;&amp; first2 != last2 ; ++first1, ++first2) {
- if (first1-&gt;native() &lt; first2-&gt;native()) return true;
- if (first2-&gt;native() &lt; first1-&gt;native()) return false;
- }
- return first1 == last1 &amp;&amp; first2 != last2;</pre>
- <p>[<i>Note:</i> A <code>path</code> aware<code> lexicographical_compare</code>
- is provided to avoid infinite recursion in <code>std::lexicographical_compare</code>
- due to the <code>path</code> iterator's value type itself being <code>path</code>.
- <i>--end note</i>]</p>
+ <p>[<i>Note:</i> A <code>path</code> aware <code>lexicographical_compare</code> algorithm is provided for historical reasons. <i>--end note</i>]</p>
+</blockquote>
+$endif
+<pre>void swap( path&amp; lhs, path&amp; rhs )</pre>
+<blockquote>
+ <p><i>Effects: </i><code>lhs.swap(rhs)</code>.</p>
 </blockquote>
 <pre>std::size_t <a name="hash_value">hash_value</a> (const path&amp; p);</pre>
 <blockquote>
   <p><i>Returns:</i> A hash value for the path <code>p</code>. If
- for two paths, <code>p1 == p2</code> then
- <code>hash_value(p1) == hash_value(p2)</code>.</p>
- <p>This allows paths to be used with
- Boost.Hash.</p>
+ for two paths, <code>p1 == p2</code> then <code>hash_value(p1) == hash_value(p2)</code>.</p>
+ <p>This allows paths to be used with Boost.Hash.</p>
 </blockquote>
 <pre>bool operator&lt; (const path&amp; lhs, const path&amp; rhs);</pre>
 <blockquote>
- <p><i>Returns:</i> <code>return lexicographical_compare(lhs.begin(), lhs.end(),
- rhs.begin(), rhs.end())</code>.</p>
+ <p><i>Returns:</i> <code>return lhs.compare(rhs.begin) &lt; 0</code>.</p>
 </blockquote>
 <pre>bool operator&lt;=(const path&amp; lhs, const path&amp; rhs);</pre>
 <blockquote>
@@ -1318,22 +1265,15 @@
 <pre>bool operator==(const path&amp; lhs, const path&amp; rhs);</pre>
 <blockquote>
   <p><i>Returns:</i> <code>!(lhs &lt; rhs) &amp;&amp; !(rhs &lt; lhs)</code>.</p>
- <p>[<i>Note:</i> Actual implementations may use an equivalent, but more
- efficient, algorithm. <i>--end note</i>]</p>
   <p>[<i>Note:</i> <a name="Path-equality">Path equality</a> and path
   equivalence have different semantics.</p>
- <p>Equality is determined by the <code>path</code>
- non-member <code>operator==</code>, which considers the two path's lexical
- representations only. Thus <code>path(&quot;foo&quot;) == &quot;bar&quot;</code> is never
- <code>true</code>.</p>
- <p>Equivalence is determined by the equivalent()
- non-member function, which determines if two paths resolve to the same file system entity.
- Thus <code>equivalent(&quot;foo&quot;, &quot;bar&quot;)</code> will be <code>true</code>
- when both paths resolve to the same file.</p>
+ <p>Equality is determined by the <code>path</code> non-member <code>operator==</code>, which considers the two path's lexical
+ representations only. Thus <code>path(&quot;foo&quot;) == &quot;bar&quot;</code> is never <code>true</code>.</p>
+ <p>Equivalence is determined by the equivalent() non-member function, which determines if two paths resolve to the same file system entity.
+ Thus <code>equivalent(&quot;foo&quot;, &quot;bar&quot;)</code> will be <code>true</code> when both paths resolve to the same file.</p>
   <p>Programmers wishing to determine if two paths are &quot;the same&quot; must decide if
   &quot;the same&quot; means &quot;the same representation&quot; or &quot;resolve to the same actual
- file&quot;, and choose the appropriate function accordingly. <i>
- -- end note</i>]</p>
+ file&quot;, and choose the appropriate function accordingly. <i>-- end note</i>]</p>
 </blockquote>
 <pre>bool operator!=(const path&amp; lhs, const path&amp; rhs);</pre>
 <blockquote>
@@ -1353,25 +1293,19 @@
                                              const path&amp; p)
 </pre>
 <blockquote>
- <p><i>Effects:</i>&nbsp;
- <code>os &lt;&lt; <a href="../../io/doc/quoted_manip.html">
- boost::io::quoted</a>(p.string&lt;std::basic_string&lt;Char&gt;&gt;(), static_cast&lt;Char&gt;('&amp;'));</code></p>
- <p><i>Returns:</i>
- <code>os</code></p>
+ <p><i>Effects:</i>&nbsp; <code>os &lt;&lt; boost::io::quoted(p.string&lt;std::basic_string&lt;Char&gt;&gt;(), static_cast&lt;Char&gt;('&amp;'));</code></p>
+ <p><i>Returns:</i> <code>os</code></p>
 </blockquote>
 <pre>template &lt;class Char, class Traits&gt;
 inline std::basic_istream&lt;Char, Traits&gt;&amp; operator&gt;&gt;(std::basic_istream&lt;Char, Traits&gt;&amp; is,
                                                     path&amp; p)
 </pre>
 <blockquote>
- <p><i>Effects:&nbsp; </i>
- <code>&nbsp;std::basic_string&lt;Char&gt; str;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is &gt;&gt;
- boost::io::quoted(str,
+ <p><i>Effects:&nbsp; </i><code>&nbsp;std::basic_string&lt;Char&gt; str;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is &gt;&gt; boost::io::quoted(str,
   static_cast&lt;Char&gt;('&amp;'));<br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p = str;</code></p>
- <p><i>Returns:</i>
- <code>is</code></p>
+ <p><i>Returns:</i> <code>is</code></p>
   </blockquote>
 <h3><a name="Class-filesystem_error">Class <code>filesystem_error</code></a></h3>
 <pre>$NAMESPACE_BEGIN;
@@ -1450,8 +1384,7 @@
     </tr>
     <tr>
       <td width="18%" valign="top"><code>path1()</code></td>
- <td width="82%">Reference to stored copy of
- <code>p1</code></td>
+ <td width="82%">Reference to stored copy of <code>p1</code></td>
     </tr>
     <tr>
       <td width="18%" valign="top"><code>path2().empty()</code></td>
@@ -1480,13 +1413,11 @@
     </tr>
     <tr>
       <td width="18%"><code>path1()</code></td>
- <td width="82%">Reference to stored copy of
- <code>p1</code></td>
+ <td width="82%">Reference to stored copy of <code>p1</code></td>
     </tr>
     <tr>
       <td width="18%"><code>path2()</code></td>
- <td width="82%">Reference to stored copy of
- <code>p2</code></td>
+ <td width="82%">Reference to stored copy of <code>p2</code></td>
     </tr>
   </table>
 </blockquote>
@@ -1503,8 +1434,7 @@
 <pre>const char* <a name="filesystem_error-what">what</a>() const;</pre>
 <blockquote>
   <p><i>Returns: </i>A string containing <code>runtime_error::what()</code>. The exact format is unspecified.
- Implementations are encouraged but not required to include <code>
- path1.native_string()</code>if not empty, <code>path2.native_string()</code>if
+ Implementations are encouraged but not required to include <code>path1.native_string()</code>if not empty, <code>path2.native_string()</code>if
   not empty, and <code>system_error::what()</code> strings in the returned
   string.</p>
 </blockquote>
@@ -1518,8 +1448,7 @@
   <tr>
     <td><code>status_error</code></td>
     <td>An error occurred while trying to obtain the status of the file. The
- file simply not being found is <b><u>not</u></b> considered a status error.
- </td>
+ file simply not being found is <b><u>not</u></b> considered a status error. </td>
   </tr>
   <tr>
     <td><code>file_not_found</code></td>
@@ -1567,11 +1496,9 @@
 <blockquote>
 <p>Caution: Operating systems do not always support permissions as described in
 the table.</p>
-<p>There is much variation in the meaning of <code><a href="#sticky_bit">
-sticky_bit</a></code>; do not use it unless you understand what it means for
+<p>There is much variation in the meaning of <code>sticky_bit</code>; do not use it unless you understand what it means for
 your operating system.</p>
-<p>There is much variation in how operating systems treat symlinks. See <code>
-symlink_perms</code>.</p>
+<p>There is much variation in how operating systems treat symlinks. See <code>symlink_perms</code>.</p>
 <p>Windows: All permissions except write are currently ignored. There is only a
 single write permission; setting write permission for owner, group, or others
 sets write permission for all, and removing write permission for owner, group,
@@ -1589,8 +1516,7 @@
 
 <tr><td>
   <p dir="ltr"><code>no_perms</code></td><td><code>0</code></td><td></td>
- <td>There are no permissions set for the file. Note: <code>file_not_found</code> is
- <code>no_perms</code> rather than <code>perms_not_known</code></td>
+ <td>There are no permissions set for the file. Note: <code>file_not_found</code> is <code>no_perms</code> rather than <code>perms_not_known</code></td>
 </tr>
 <tr><td><code>owner_read</code></td><td><code>0400</code></td><td> <code>S_IRUSR</code></td>
   <td> Read permission, owner</td>
@@ -1637,7 +1563,7 @@
 <tr><td><code>set_gid_on_exe</code></td><td><code>02000</code></td><td> <code>S_ISGID</code></td>
   <td> Set-group-ID on execution</td>
 </tr>
-<tr><td><code><a name="sticky_bit">sticky_bit</a> </code> </td><td><code>01000</code></td><td> <code>S_ISVTX</code></td>
+<tr><td><code><a name="sticky_bit">sticky_bit</a> </code></td><td><code>01000</code></td><td> <code>S_ISVTX</code></td>
   <td> Meaning varies; see http:en.wikipedia.org/wiki/Sticky_bit</td>
 </tr>
 <tr><td><code><a name="perms_mask">perms_mask</a></code></td><td><code>07777</code></td><td> &nbsp;</td>
@@ -1657,11 +1583,9 @@
   file's current bits</td>
 </tr>
 <tr><td><code><a name="symlink_perms">symlink_perms</a></code></td><td><code>0x4000</code></td><td></td><td>
- On POSIX <code>permissions()</code> resolves symlinks unless <code>symlink_perms</code>
- is specified.
+ On POSIX <code>permissions()</code> resolves symlinks unless <code>symlink_perms</code> is specified.
   Meaningless on Windows as <code>permissions()</code> never resolves symlinks.
- Meaningless on Mac OS X and some other BSD systems as <code>permissions()</code>
- always resolves symlinks. Get over it.</td>
+ Meaningless on Mac OS X and some other BSD systems as <code>permissions()</code> always resolves symlinks. Get over it.</td>
 </tr>
 
 </table>
@@ -1691,31 +1615,24 @@
 $NAMESPACE_END;</pre>
 <p>An object of type <code>file_status</code> stores information about the type
 and permissions of a file.</p>
-<h4 dir="ltr"><a name="file_status-constructors"><code>file_status</code>
-constructors</a></h4>
+<h4 dir="ltr"><a name="file_status-constructors"><code>file_status</code> constructors</a></h4>
 <pre>explicit file_status() noexcept;</pre>
 <blockquote>
- <p><i>Postconditions:</i> <code>type() == status_error</code>, <code>
- permissions() == perms_not_known</code>.</p>
+ <p><i>Postconditions:</i> <code>type() == status_error</code>, <code>permissions() == perms_not_known</code>.</p>
 </blockquote>
 <pre>explicit file_status(file_type ft, perms prms = perms_not_known) noexcept;</pre>
 <blockquote>
   <p><i>Postconditions:</i> <code>type() == ft</code>, <code>permissions() ==
   prms</code>.</p>
 </blockquote>
- <h4 dir="ltr"><a name="file_status-observers"><code>file_status</code>
- observers</a></h4>
+ <h4 dir="ltr"><a name="file_status-observers"><code>file_status</code> observers</a></h4>
 <pre>file_type type() const noexcept;</pre>
 <blockquote>
- <p><i>Returns: </i>The value of <code>type()</code> specified by the <i>
- postconditions</i> of the most recent call to a constructor, operator=, or
- <code>type(file_type)</code> function.</p>
+ <p><i>Returns: </i>The value of <code>type()</code> specified by the <i>postconditions</i> of the most recent call to a constructor, operator=, or <code>type(file_type)</code> function.</p>
 </blockquote>
 <pre>perms permissions() const noexcept;</pre>
 <blockquote>
- <p><i>Returns: </i>The value of <code>permissions()</code> specified by the <i>
- postconditions</i> of the most recent call to a constructor, operator=, or
- <code>permissions(perms)</code> function.</p>
+ <p><i>Returns: </i>The value of <code>permissions()</code> specified by the <i>postconditions</i> of the most recent call to a constructor, operator=, or <code>permissions(perms)</code> function.</p>
 </blockquote>
 <h4 dir="ltr"><a name="file_status-modifiers"><code>file_status</code> modifiers</a></h4>
 <pre>void type(file_type ft) noexcept;</pre>
@@ -1770,9 +1687,7 @@
 $NAMESPACE_END;</pre>
 </div>
 <p>A <code>directory_entry</code> object stores a <code>path object</code>,
-a <code>file_status</code> object for non-symbolic link status, and a <code>
-file_status</code> object for symbolic link status. The <code>file_status</code>
-objects act as value caches.</p>
+a <code>file_status</code> object for non-symbolic link status, and a <code>file_status</code> object for symbolic link status. The <code>file_status</code> objects act as value caches.</p>
 <blockquote>
 <p>[<i>Note:</i> Because <code>status()</code>on a pathname may be a very expensive operation,
 some operating systems provide status information as a byproduct of directory
@@ -1882,8 +1797,7 @@
 <pre>file_status status() const;
 file_status status(system::error_code&amp; ec) const;</pre>
 <blockquote>
-<p><i>Effects:</i>
-As if,</p>
+<p><i>Effects:</i> As if,</p>
   <blockquote>
     <pre>if ( !status_known( m_status ) )
 {
@@ -1894,29 +1808,23 @@
   </blockquote>
   <p><i>Returns:</i> <code>m_status</code></p>
   
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   
 </blockquote>
 <pre>file_status symlink_status() const;
 file_status symlink_status(system::error_code&amp; ec) const;</pre>
 <blockquote>
 <p>
- <i>Effects:</i>
-As if,</p>
+ <i>Effects:</i> As if,</p>
   <blockquote>
     <pre>if ( !status_known( m_symlink_status ) )
 {
   m_symlink_status = symlink_status(m_path<i>[, ec]</i>);
 }</pre>
   </blockquote>
- <p><i>Returns:</i> <code>
- m_symlink_status</code></p>
+ <p><i>Returns:</i> <code>m_symlink_status</code></p>
   
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   
 </blockquote>
 <pre>bool operator==(const directory_entry&amp; rhs);</pre>
@@ -1951,8 +1859,7 @@
 </blockquote>
 <h3><a name="Class-directory_iterator">Class <code>directory_iterator</code></a></h3>
 <p>Objects of type <code>directory_iterator</code> provide standard library
-compliant iteration over the contents of a directory. Also see class <code>
-recursive_directory_iterator</code>.</p>
+compliant iteration over the contents of a directory. Also see class <code>recursive_directory_iterator</code>.</p>
 <pre>$NAMESPACE_BEGIN;
       class directory_iterator
       {
@@ -1978,25 +1885,16 @@
 <p> <code>directory_iterator</code> satisfies the requirements of an
 input iterator (C++ Std, 24.2.1, Input iterators [input.iterators]).</p>
 <p>A <code>directory_iterator</code> reads successive elements from the directory for
-which it was constructed, as if by calling <i>POSIX</i>
-<code>
-readdir_r()</code>. After a <code>directory_iterator</code> is constructed, and every time
-<code>operator++</code> is called,
-it reads a directory element and stores information about it in a object of type <code>
-directory_entry</code>.
-<code>operator++</code> is not equality preserving; that is, <code>i == j</code> does not imply that
-<code>++i == ++j</code>. </p>
+which it was constructed, as if by calling <i>POSIX</i> <code>readdir_r()</code>. After a <code>directory_iterator</code> is constructed, and every time <code>operator++</code> is called,
+it reads a directory element and stores information about it in a object of type <code>directory_entry</code>. <code>operator++</code> is not equality preserving; that is, <code>i == j</code> does not imply that <code>++i == ++j</code>. </p>
 <blockquote>
 <p>[<i>Note:</i> The practical consequence of not preserving equality is that directory iterators
 can only be used for single-pass algorithms. <i>--end note</i>]</p>
 </blockquote>
 <p>If the end of the directory elements is reached, the iterator becomes equal to
-the end iterator value. The constructor <code>directory_iterator()</code>
-with no arguments always constructs an end iterator object, which is the only
-legitimate iterator to be used for the end condition. The result of <code>
-operator*</code> on an end iterator is not defined. For any other iterator value
-a <code>const directory_entry&amp;</code> is returned. The result of
-<code>operator-&gt;</code> on an end iterator is not defined. For any other iterator value a <code>const directory_entry*</code> is
+the end iterator value. The constructor <code>directory_iterator()</code> with no arguments always constructs an end iterator object, which is the only
+legitimate iterator to be used for the end condition. The result of <code>operator*</code> on an end iterator is not defined. For any other iterator value
+a <code>const directory_entry&amp;</code> is returned. The result of <code>operator-&gt;</code> on an end iterator is not defined. For any other iterator value a <code>const directory_entry*</code> is
 returned. </p>
 <p>Two end iterators are always equal. An end iterator is not equal to a non-end
 iterator.</p>
@@ -2004,12 +1902,8 @@
 <p><i><span style="background-color: #E0E0E0">The above wording is based on the
 Standard Library's istream_iterator wording.</span></i></p>
 </blockquote>
-<p>The result of calling the <code>path()</code> member of the <code>
-directory_entry</code> object obtained by dereferencing a <code>
-directory_iterator</code> is a reference to a <code>path</code>
-object composed of the directory argument from which the iterator was
-constructed with filename of the directory entry appended as if by <code>
-operator/=</code>. </p>
+<p>The result of calling the <code>path()</code> member of the <code>directory_entry</code> object obtained by dereferencing a <code>directory_iterator</code> is a reference to a <code>path</code> object composed of the directory argument from which the iterator was
+constructed with filename of the directory entry appended as if by <code>operator/=</code>. </p>
 <p>Directory iteration shall not yield directory entries for the current (<i>dot</i>)
 and parent (<i>dot dot</i>) directories.</p>
 <p>The order of directory entries obtained by dereferencing successive
@@ -2024,11 +1918,7 @@
 <p>If a file is removed from or added to a directory after the
 construction of a <code>directory_iterator</code> for the directory, it is
 unspecified whether or not subsequent incrementing of the iterator will ever
-result in an iterator whose value is the removed or added directory entry. See
-<i>POSIX</i>
-<code>
-readdir_r()</code>. <i>
---end note</i>]</p>
+result in an iterator whose value is the removed or added directory entry. See <i>POSIX</i> <code>readdir_r()</code>. <i>--end note</i>]</p>
 </blockquote>
 <h4><a name="directory_iterator-members"><code>directory_iterator</code> members</a></h4>
 
@@ -2048,13 +1938,9 @@
 <p><i>Effects:</i> Constructs a iterator representing the first
 entry in the directory <code>p</code> resolves to, if any; otherwise, the end iterator.</p>
 
-<p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
-
-<p>[<i>Note:</i> To iterate over the current directory, use <code>
-directory_iterator(&quot;.&quot;)</code> rather than <code>directory_iterator(&quot;&quot;)</code>.
-<i>-- end note</i>]</p>
+<p><i>Throws:</i> As specified in Error reporting.</p>
+
+<p>[<i>Note:</i> To iterate over the current directory, use <code>directory_iterator(&quot;.&quot;)</code> rather than <code>directory_iterator(&quot;&quot;)</code>. <i>-- end note</i>]</p>
 </blockquote>
 <pre>directory_iterator&amp; <a name="directory_iterator-increment">operator++</a>();
 directory_iterator&amp; increment(system::error_code&amp; ec);</pre>
@@ -2064,9 +1950,7 @@
 
 <p><i>Returns:</i> <code>*this</code>.</p>
 
-<p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+<p><i>Throws:</i> As specified in Error reporting.</p>
 
 </blockquote>
 <h3><a name="Class-recursive_directory_iterator">Class <code>recursive_directory_iterator</code></a></h3>
@@ -2142,23 +2026,15 @@
 <p><i>Effects:</i>&nbsp; Constructs a iterator representing the first
 entry in the directory <code>p</code> resolves to, if any; otherwise, the end iterator.</p>
 
-<p dir="ltr"><i>Postcondition: </i>Unless the end iterator was constructed,<i> </i>
-<code>level() == 0 &amp;&amp; no_push_pending() == false &amp;&amp; m_options == opt</code>.
-For the signature without a <code>symlink_option</code> argument, <code>opt</code>
-is assumed to be <code>symlink_option::none</code>.</p>
-
-<p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
-
-<p>[<i>Note:</i> To iterate over the current directory, use <code>recursive_directory_iterator(&quot;.&quot;)</code> rather than
-<code>recursive_directory_iterator(&quot;&quot;)</code>.
-<i>-- end note</i>]</p>
+<p dir="ltr"><i>Postcondition: </i>Unless the end iterator was constructed,<i> </i><code>level() == 0 &amp;&amp; no_push_pending() == false &amp;&amp; m_options == opt</code>.
+For the signature without a <code>symlink_option</code> argument, <code>opt</code> is assumed to be <code>symlink_option::none</code>.</p>
+
+<p><i>Throws:</i> As specified in Error reporting.</p>
+
+<p>[<i>Note:</i> To iterate over the current directory, use <code>recursive_directory_iterator(&quot;.&quot;)</code> rather than <code>recursive_directory_iterator(&quot;&quot;)</code>. <i>-- end note</i>]</p>
 
 <p>[<i>Note:</i> By default, <code>recursive_directory_iterator</code> does not
-follow directory symlinks. To follow directory symlinks, specify <code>opt</code>
-as <code>symlink_option::recurse</code>
-<i>-- end note</i>]</p>
+follow directory symlinks. To follow directory symlinks, specify <code>opt</code> as <code>symlink_option::recurse</code> <i>-- end note</i>]</p>
 </blockquote>
 <pre>int level() const noexcept;</pre>
 <blockquote>
@@ -2182,8 +2058,7 @@
 
 <p dir="ltr">if <code>!no_push_pending() &amp;&amp; is_directory(this-&gt;status())
 &amp;&amp; (!is_symlink(this-&gt;symlink_status()) || (m_options
-&amp; symlink_option::recurse) != 0)</code> then&nbsp; <code>m_level</code>
-is incremented and directory <code>(*this)-&gt;path()</code> is recursively iterated into.<br>
+&amp; symlink_option::recurse) != 0)</code> then&nbsp; <code>m_level</code> is incremented and directory <code>(*this)-&gt;path()</code> is recursively iterated into.<br>
 &nbsp;</p>
 
   </li>
@@ -2195,9 +2070,7 @@
 
 <p><i>Returns:</i> <code>*this</code>.</p>
 
-<p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+<p><i>Throws:</i> As specified in Error reporting.</p>
 
 </blockquote>
 <pre>void pop();</pre>
@@ -2219,11 +2092,8 @@
 storage.</p>
 <p>Operational functions access a file by resolving an
 object of class <code>path</code> to a particular file in a file hierarchy. The
-path is resolved as if by the <i>POSIX</i>
-<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap04.html#tag_04_11">
-Pathname Resolution</a> mechanism.</p>
-<p>[<i>Note: </i>Because hardware failures, network failures,
-file system races, and many
+path is resolved as if by the <i>POSIX</i> Pathname Resolution mechanism.</p>
+<p>[<i>Note: </i>Because hardware failures, network failures, file system races, and many
 other kinds of errors occur frequently in file system operations, users should be aware
 that any filesystem operational function, no matter how apparently innocuous, may encounter
 an error.&nbsp;See Error reporting. <i>-- end note</i>]</p>
@@ -2252,8 +2122,7 @@
       <td align="center"><code>return absolute(base) / p</code></td>
     </tr>
   </table>
- <p dir="ltr">[<i>Note:</i> For the returned path, <code>rp,</code> <code>
- rp.is_absolute()</code> is true. <i>-- end note</i>]</p>
+ <p dir="ltr">[<i>Note:</i> For the returned path, <code>rp,</code> <code>rp.is_absolute()</code> is true. <i>-- end note</i>]</p>
   <p><i>Throws:</i> If <code>base.is_absolute()</code> is true, throws only if
   memory allocation fails.</p>
 </blockquote>
@@ -2267,9 +2136,7 @@
 <p><i>Returns:</i> A canonical path that refers to
 the same file system object as <code>absolute(p,base)</code>. For the overload
 without a <code>base</code> argument, <code>base</code> is <code>current_path()</code>.</p>
- <p><i>Throws:</i>&nbsp; As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i>&nbsp; As specified in Error reporting.</p>
   
   <p><i>Remarks:</i> <code>!exists(p)</code> is an error.</p>
   
@@ -2293,9 +2160,7 @@
 else
 <i> Report error as specified in Error reporting.</i></pre>
   </blockquote>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   
 </blockquote>
 <pre>void <a name="copy_directory">copy_directory</a>(const path&amp; from, const path&amp; to);
@@ -2303,9 +2168,7 @@
 <blockquote>
   <p><i>Effects: </i></p>
   
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   
 </blockquote>
 <pre>void copy_file(const path&amp; from, const path&amp; to);
@@ -2314,20 +2177,15 @@
   <p><i>Effects: </i><code>copy_file(from, to,
   copy_option::fail_if_exists</code><i>[</i><code>, ec</code><i>]</i><code>)</code>.</p>
   
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   
 </blockquote>
 <pre>void <a name="copy_file">copy_file</a>(const path&amp; from, const path&amp; to, copy_option option);
 void <a name="copy_file2">copy_file</a>(const path&amp; from, const path&amp; to, copy_option option, system::error_code&amp; ec);</pre>
 <blockquote>
   <p><i>Effects:</i> If <code>option == copy_option::</code><code>fail_if_exists
- &amp;&amp; exists(to)</code>, an error is reported. Otherwise, the contents and attributes of the file <code>from</code>
- resolves to are copied to the file <code>to</code> resolves to.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ &amp;&amp; exists(to)</code>, an error is reported. Otherwise, the contents and attributes of the file <code>from</code> resolves to are copied to the file <code>to</code> resolves to.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>void <a name="copy_symlink">copy_symlink</a>(const path&amp; existing_symlink, const path&amp; new_symlink);
 void copy_symlink(const path&amp; existing_symlink, const path&amp; new_symlink, system::error_code&amp; ec);</pre>
@@ -2335,73 +2193,49 @@
   <p><i>Effects: </i><code>create_symlink(read_symlink(existing_symlink</code><i>[</i><code>, ec</code><i>]</i><code>),
   new_symlink</code><i>[</i><code>, ec</code><i>]</i><code>)</code>.</p>
   
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   
 </blockquote>
 <pre>bool <a name="create_directories">create_directories</a>(const path&amp; p);
 bool <a name="create_directories2">create_directories</a>(const path&amp; p, system::error_code&amp; ec);</pre>
 <blockquote>
   <p><i>Requires:</i> <code>p.empty() || <br>
- forall px: px == p || is_parent(px, p): is_directory(px) || !exists( px )</code>
- </p>
+ forall px: px == p || is_parent(px, p): is_directory(px) || !exists( px )</code> </p>
   <p><i>Postcondition:</i> <code>is_directory(p)</code></p>
   <p><i>Returns:</i> The value of <code>!exists(p)</code> prior to the
   establishment of the postcondition.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>bool <a name="create_directory">create_directory</a>(const path&amp; p);
 bool <a name="create_directory2">create_directory</a>(const path&amp; p, system::error_code&amp; ec);</pre>
 <blockquote>
   <p><i>Effects:</i> Attempts to create the directory <code>p</code> resolves to,
- as if by<i> POSIX </i><code>
- mkdir()</code> with a second argument of S_IRWXU|S_IRWXG|S_IRWXO. </p>
+ as if by<i> POSIX </i><code>mkdir()</code> with a second argument of S_IRWXU|S_IRWXG|S_IRWXO. </p>
   <p><i>Postcondition:</i> <code>is_directory(p)</code></p>
- <p><i>Returns:</i> <code>true</code> if a new directory was created, otherwise
- <code>false</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Returns:</i> <code>true</code> if a new directory was created, otherwise <code>false</code>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>void <a name="create_directory_symlink">create_directory_symlink</a>(const path&amp; to, const path&amp; new_symlink);
 void create_directory_symlink(const path&amp; to, const path&amp; new_symlink, system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Effects:</i>
- Establishes the postcondition, as if by <i>
- POSIX</i>
- <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/symlink.html">
- symlink()</a></code>.</p>
+ <p><i>Effects:</i> Establishes the postcondition, as if by <i>POSIX</i> <code>symlink()</code>.</p>
   <p><i>
   Postcondition:</i> <code>new_symlink</code> resolves to a symbolic link file that
   contains an unspecified representation of <code>to</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
- <p dir="ltr">[<i>Note:</i>
- Some operating systems, such as Windows, require symlink creation to
- identify that the link is to a directory. Portable code should use <code>
- create_directory_symlink()</code> to create directory symlinks rather than
- <code>create_symlink()</code> <i>-- end note</i>]</p>
- <p>[<i>Note:</i>
- Some operating systems do not support symbolic links at all or support
+ <p><i>Throws:</i> As specified in Error reporting.</p>
+ <p dir="ltr">[<i>Note:</i> Some operating systems, such as Windows, require symlink creation to
+ identify that the link is to a directory. Portable code should use <code>create_directory_symlink()</code> to create directory symlinks rather than <code>create_symlink()</code> <i>-- end note</i>]</p>
+ <p>[<i>Note:</i> Some operating systems do not support symbolic links at all or support
   them only for regular files.
   Some file systems do not
   support
   symbolic links regardless of the operating system - the FAT file system used on
- memory cards and flash drives, for example. <i>-- end note</i>]</p>
+ memory cards and flash drives, for example. <i>-- end note</i>]</p>
   </blockquote>
 <pre>void <a name="create_hard_link">create_hard_link</a>(const path&amp; to, const path&amp; new_hard_link);
 void <a name="create_hard_link2">create_hard_link</a>(const path&amp; to, const path&amp; new_hard_link, system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Effects:</i> Establishes the postcondition, as if by
- <i>POSIX</i>
- <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/link.html">
- link()</a></code>.</p>
+ <p><i>Effects:</i> Establishes the postcondition, as if by <i>POSIX</i> <code>link()</code>.</p>
   <p><i>Postcondition:</i></p>
   <ul>
     <li>&nbsp;<code>exists(to) &amp;&amp;
@@ -2411,51 +2245,34 @@
     <li>The contents of the file or directory
     <code>to</code> resolves to are unchanged.</li>
   </ul>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
- <p>[<i>Note:</i>
- Some operating systems do not support hard links at all or support
+ <p><i>Throws:</i> As specified in Error reporting.</p>
+ <p>[<i>Note:</i> Some operating systems do not support hard links at all or support
   them only for regular files. Some file systems do not support hard
   links regardless of the operating system - the FAT file system used on memory
   cards and flash drives, for example. Some file systems limit the number of
- links per file. <i>-- end note</i>]</p>
+ links per file. <i>-- end note</i>]</p>
   </blockquote>
 <pre>void <a name="create_symlink">create_symlink</a>(const path&amp; to, const path&amp; new_symlink);
 void <a name="create_symlink2">create_symlink</a>(const path&amp; to, const path&amp; new_symlink, system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Effects:</i>
- Establishes the postcondition, as if by <i>
- POSIX</i>
- <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/symlink.html">
- symlink()</a></code>.</p>
+ <p><i>Effects:</i> Establishes the postcondition, as if by <i>POSIX</i> <code>symlink()</code>.</p>
   <p><i>
   Postcondition:</i> <code>new_symlink</code> resolves to a symbolic link file that
   contains an unspecified representation of <code>to</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
- <p>[<i>Note:</i>
- Some operating systems do not support symbolic links at all or support
+ <p><i>Throws:</i> As specified in Error reporting.</p>
+ <p>[<i>Note:</i> Some operating systems do not support symbolic links at all or support
   them only for regular files.
   Some file systems do not
   support
   symbolic links regardless of the operating system - the FAT system used on
- memory cards and flash drives, for example. <i>-- end note</i>]</p>
+ memory cards and flash drives, for example. <i>-- end note</i>]</p>
   </blockquote>
 <pre>path <a name="current_path">current_path</a>();
 path <a name="current_path2">current_path</a>(system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Returns:</i> The current working directory path, as if by <i>POSIX</i>
- <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/getcwd.html">
- getcwd()</a></code>. <code>is_absolute()</code> is true for the returned path.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
- <p>[<i>Note: </i>The <code>
- current_path()</code> name was chosen to emphasize that the return is a
+ <p><i>Returns:</i> The current working directory path, as if by <i>POSIX</i> <code>getcwd()</code>. <code>is_absolute()</code> is true for the returned path.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
+ <p>[<i>Note: </i>The <code>current_path()</code> name was chosen to emphasize that the return is a
   path, not just a single directory name.</p>
   <p>The current path as returned by many operating systems is a dangerous
   global variable. It may be changed unexpectedly by a third-party or system
@@ -2464,24 +2281,16 @@
 <pre>void current_path(const path&amp; p);
 void current_path(const path&amp; p, system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Effects:</i>
- Establishes the postcondition, as if by <i>
- POSIX</i>
- <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/chdir.html">
- chdir()</a></code>.</p>
+ <p><i>Effects:</i> Establishes the postcondition, as if by <i>POSIX</i> <code>chdir()</code>.</p>
 <p><i>Postcondition:</i> <code>equivalent(p, current_path())</code>.</p>
-<p><i>Throws:</i> As specified in
-<a href="#Error-reporting">
-Error reporting</a>.</p>
+<p><i>Throws:</i> As specified in Error reporting.</p>
   <p>[<i>Note: </i>The current path for many operating systems is a dangerous
   global state. It may be changed unexpectedly by a third-party or system
   library functions, or by another thread.&nbsp; <i>-- end note</i>]</p>
 </blockquote>
 <pre>bool <a name="exists">exists</a>(file_status s) noexcept;</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>status_known(s) &amp;&amp; s.type() != file_not_found</code></p>
+ <p><i>Returns:</i> <code>status_known(s) &amp;&amp; s.type() != file_not_found</code></p>
 </blockquote>
 <pre>bool <a name="exists2">exists</a>(const path&amp; p);
 bool <a name="exists3">exists</a>(const path&amp; p, system::error_code&amp; ec) noexcept;</pre>
@@ -2494,8 +2303,7 @@
 <pre><code>bool <a name="equivalent">equivalent</a>(const path&amp; p1, const path&amp; p2);
 bool <a name="equivalent2">equivalent</a>(const path&amp; p1, const path&amp; p2, system::error_code&amp; ec);</code></pre>
 <blockquote>
- <p><i>Effects:</i> Determines <code>file_status s1</code>
- and <code>s2</code>, as if by <code>status(p1)</code> and&nbsp; <code>status(p2)</code>,
+ <p><i>Effects:</i> Determines <code>file_status s1</code> and <code>s2</code>, as if by <code>status(p1)</code> and&nbsp; <code>status(p2)</code>,
   respectively.</p>
   <p><i>Returns:</i> <code>true</code>, if <code>sf1 ==
   sf2</code> and <code>p1</code> and <code>p2</code> resolve to the same file
@@ -2503,28 +2311,13 @@
   <blockquote>
   <p>Two paths are considered to resolve to the same
   file system entity if two candidate entities reside on the same device at the
- same location. This is determined as if by the values of the <i>POSIX</i>
- <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/stat.h.html">
- stat</a></code> structure<code>,</code> obtained as if by <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/stat.html">
- stat()</a></code> for the two paths, having equal <code>st_dev</code> values
+ same location. This is determined as if by the values of the <i>POSIX</i> <code>stat</code> structure<code>,</code> obtained as if by <code>stat()</code> for the two paths, having equal <code>st_dev</code> values
   and equal <code>st_ino</code> values.</p>
- <p>[<i>Note:</i> <i>POSIX</i> requires that <i>&quot;st_dev</i>
- must be unique within a Local Area Network&quot;. Conservative <i>POSIX</i>
- implementations may also wish to check for equal <code>st_size</code> and
- <code>st_mtime</code> values. <i>Windows</i> implementations may use <code>
- GetFileInformationByHandle()</code> as a surrogate for <code>stat()</code>,
- and consider &quot;same&quot; to be equal values for <code>dwVolumeSerialNumber</code>,
- <code>nFileIndexHigh</code>, <code>nFileIndexLow</code>, <code>nFileSizeHigh</code>,
- <code>nFileSizeLow</code>, <code>ftLastWriteTime.dwLowDateTime</code>, and
- <code>ftLastWriteTime.dwHighDateTime</code>. <i>-- end note</i>]</p>
- </blockquote>
- <p><i>Throws:</i> <code>filesystem_error</code>
- if <code>(!exists(s1) &amp;&amp; !exists(s2)) || (is_other(s1) &amp;&amp; is_other(s2))</code>,
- otherwise as specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p>[<i>Note:</i> <i>POSIX</i> requires that <i>&quot;st_dev</i> must be unique within a Local Area Network&quot;. Conservative <i>POSIX</i> implementations may also wish to check for equal <code>st_size</code> and <code>st_mtime</code> values. <i>Windows</i> implementations may use <code>GetFileInformationByHandle()</code> as a surrogate for <code>stat()</code>,
+ and consider &quot;same&quot; to be equal values for <code>dwVolumeSerialNumber</code>, <code>nFileIndexHigh</code>, <code>nFileIndexLow</code>, <code>nFileSizeHigh</code>, <code>nFileSizeLow</code>, <code>ftLastWriteTime.dwLowDateTime</code>, and <code>ftLastWriteTime.dwHighDateTime</code>. <i>-- end note</i>]</p>
+ </blockquote>
+ <p><i>Throws:</i> <code>filesystem_error</code> if <code>(!exists(s1) &amp;&amp; !exists(s2)) || (is_other(s1) &amp;&amp; is_other(s2))</code>,
+ otherwise as specified in Error reporting.</p>
 </blockquote>
 <div dir="ltr">
 <pre>uintmax_t <a name="file_size">file_size</a>(const path&amp; p);
@@ -2534,44 +2327,32 @@
   <p><i>Returns:</i> If <code>exists(p) &amp;&amp; is_regular_file(p)</code>, the size
   in bytes
   of the file <code>p</code> resolves to, determined as if by the value of
- the <i>POSIX</i> <code>
- stat</code> structure member <code>st_size</code>
- obtained as if by <i>POSIX</i> <code>
- stat()</code>.
+ the <i>POSIX</i> <code>stat</code> structure member <code>st_size</code> obtained as if by <i>POSIX</i> <code>stat()</code>.
   Otherwise, <code>static_cast&lt;uintmax_t&gt;(-1)</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>uintmax_t <a name="hard_link_count">hard_link_count</a>(const path&amp; p);
 uintmax_t hard_link_count(const path&amp; p, system::error_code&amp; ec);</pre>
 <blockquote>
 
   <p><i>Returns:</i> The number of hard links for <code>p</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 
 </blockquote>
 
 <pre>const path&amp; <a name="initial_path">initial_path</a>();
 const path&amp; <a name="initial_path2">initial_path</a>(<code>system::error_code&amp; ec</code>);</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>current_path()</code> as of the first call to <code>initial_path()</code>.</p>
- <p>[<i>Note:</i> <code>
- initial_path()</code> is not thread safe, and may return an undesirable result
+ <p><i>Returns:</i> <code>current_path()</code> as of the first call to <code>initial_path()</code>.</p>
+ <p>[<i>Note:</i> <code>initial_path()</code> is not thread safe, and may return an undesirable result
   if called subsequent to a change to the current directory. These problems can
   be avoided by calling <code>initial_path()</code> immediately on entry to
   main().&nbsp; <i>--end note</i>]</p>
- <p><i>Throws:</i> For the first call, as specified in
- <a href="#Error-reporting">
- Error reporting</a>. Subsequent calls throw nothing.</p>
+ <p><i>Throws:</i> For the first call, as specified in Error reporting. Subsequent calls throw nothing.</p>
 </blockquote>
 <pre>bool <code><a name="is_directory">is_directory</a></code>(file_status s) noexcept;</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>s.type() == directory_file</code></p>
+ <p><i>Returns:</i> <code>s.type() == directory_file</code></p>
 </blockquote>
 <pre><code>bool <a name="is_directory2">is_directory</a>(const path&amp; p);
 bool <a name="is_directory3">is_directory</a>(const path&amp; p, system::error_code&amp; ec) noexcept;</code></pre>
@@ -2584,8 +2365,7 @@
 <pre><code>bool <a name="is_empty">is_empty</a>(const path&amp; p);
 bool <a name="is_empty2">is_empty</a></a>(const path&amp; p, system::error_code&amp; ec);</code></pre>
 <blockquote>
- <p><i>Effects:</i> Determines <code>file_status s</code>, as if by <code>
- status(p, ec)</code>.</p>
+ <p><i>Effects:</i> Determines <code>file_status s</code>, as if by <code>status(p, ec)</code>.</p>
   <p><i>Returns:</i> <code>is_directory(s)<br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ?
   directory_iterator(p) == directory_iterator()<br>
@@ -2593,33 +2373,22 @@
 </blockquote>
 <pre>bool <code><a name="is_regular_file">is_regular_file</a></code>(file_status s) noexcept;</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>s.type() == regular_file</code></p>
+ <p><i>Returns:</i> <code>s.type() == regular_file</code></p>
 </blockquote>
 <pre><code>bool <a name="is_regular_file2">is_regular_file</a>(const path&amp; p);</code></pre>
 <blockquote>
   <p><i>Returns:</i> <code>is_regular_file(status(p))</code>.</p>
- <p><i>Throws:</i> <code>filesystem_error</code>
- if <code>status(p)</code> would throw <code>filesystem_error.</code></p>
+ <p><i>Throws:</i> <code>filesystem_error</code> if <code>status(p)</code> would throw <code>filesystem_error.</code></p>
   </blockquote>
 <pre><code>bool <a name="is_regular_file3">is_regular_file</a>(const path&amp; p, system::error_code&amp; ec) noexcept;</code></pre>
 <blockquote>
- <p><i>Effects:</i> Sets <code>ec</code> as if by <code>status(p, ec)</code>. [<i>Note:</i>
- <code>status_error</code>,
- <code>file_not_found</code>
- and
- <code>type_unknown</code>
- cases set <code>ec</code>
- to error values. To distinguish between cases, call the <code>
- status</code>
- function directly. <i>-- end
+ <p><i>Effects:</i> Sets <code>ec</code> as if by <code>status(p, ec)</code>. [<i>Note:</i> <code>status_error</code>, <code>file_not_found</code> and <code>type_unknown</code> cases set <code>ec</code> to error values. To distinguish between cases, call the <code>status</code> function directly. <i>-- end
   note</i>] </p>
   <p><i>Returns:</i> <code>is_regular_file(status(p, ec))</code>.</p>
 </blockquote>
 <pre>bool <a name="is_other">is_other</a>(file_status s) noexcept;</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>return exists(s) &amp;&amp; !is_regular_file(s) &amp;&amp; !is_directory(s) &amp;&amp; !is_symlink(s)</code></p>
+ <p><i>Returns:</i> <code>return exists(s) &amp;&amp; !is_regular_file(s) &amp;&amp; !is_directory(s) &amp;&amp; !is_symlink(s)</code></p>
 </blockquote>
 <pre><code>bool <a name="is_other2">is_other</a>(const path&amp; p);
 bool <a name="is_other3">is_other</a>(const path&amp; p, system::error_code&amp; ec) noexcept;</code></pre>
@@ -2631,8 +2400,7 @@
 </blockquote>
 <pre>bool <a name="is_symlink">is_symlink</a>(file_status s) noexcept;</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>s.type() == symlink_file</code></p>
+ <p><i>Returns:</i> <code>s.type() == symlink_file</code></p>
 </blockquote>
 <pre><code>bool <a name="is_symlink2">is_symlink</a>(const path&amp; p);
 bool <a name="is_symlink3">is_symlink</a>(const path&amp; p, system::error_code&amp; ec) noexcept;</code></pre>
@@ -2646,27 +2414,16 @@
 std::time_t <a name="last_write_time2">last_write_time</a>(const path&amp; p<code>, system::error_code&amp; ec</code>);</pre>
 <blockquote>
   <p><i>Returns:</i> The time of last data modification of <code>p</code>, determined as if by the
- value of the <i>POSIX</i> <code>
- stat</code> structure member <code>st_mtime</code>&nbsp; obtained
- as if by <i>POSIX</i> <code>
- stat()</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ value of the <i>POSIX</i> <code>stat</code> structure member <code>st_mtime</code>&nbsp; obtained
+ as if by <i>POSIX</i> <code>stat()</code>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>void <a name="last_write_time3">last_write_time</a>(const path&amp; p, const std::time_t new_time);
 void <a name="last_write_time4">last_write_time</a>(const path&amp; p, const std::time_t new_time<code>, system::error_code&amp; ec</code>);</pre>
 <blockquote>
   <p><i>Effects:</i> Sets the time of last data modification of the file
- resolved to by <code>p</code>
- to <code>new_time</code>, as if by <i>POSIX</i> <code>
- stat()</code>
- followed by <i>POSIX</i>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/utime.html">
- <code>utime()</code></a>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ resolved to by <code>p</code> to <code>new_time</code>, as if by <i>POSIX</i> <code>stat()</code> followed by <i>POSIX</i> utime().</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   <p>[<i>Note:</i> A postcondition of <code>last_write_time(p) ==
   new_time</code> is not specified since it might not hold for file systems
   with coarse time granularity. <i>-- end note</i>]</p>
@@ -2676,11 +2433,7 @@
 <blockquote>
   <p dir="ltr">
   <i>Requires:</i> <code>!((prms &amp; add_perms) &amp;&amp; (prms &amp; remove_perms))</code>.</p>
- <p dir="ltr"><i>Effects:</i> Applies the effective permissions bits from <code>
- prms</code> to the file <code>p</code> resolves to, as if by <i>POSIX</i>
- <code>
- <a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchmodat.html">
- fchmodat()</a></code>. The effective permission bits are determined as
+ <p dir="ltr"><i>Effects:</i> Applies the effective permissions bits from <code>prms</code> to the file <code>p</code> resolves to, as if by <i>POSIX</i> <code>fchmodat()</code>. The effective permission bits are determined as
   specified by the following table. </p>
   <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
     <tr>
@@ -2694,22 +2447,16 @@
     <tr>
       <td><code>add_perms</code></td>
       <td>
- <p dir="ltr"><code>status(p).permissions() | (prms &amp;
- perms_mask)</code>
- </td>
+ <p dir="ltr"><code>status(p).permissions() | (prms &amp; perms_mask)</code> </td>
     </tr>
     <tr>
       <td><code>remove_perms</code></td>
- <td><code>status(p)</code><code>.permissions() &amp; ~(prms &amp;
- perms_mask)
- </code> </td>
+ <td><code>status(p)</code><code>.permissions() &amp; ~(prms &amp; perms_mask) </code></td>
     </tr>
   </table>
   <p>[<i>Note:</i> Conceptually permissions are viewed as bits, but the actual
   implementation may use some other mechanism. -- <i>end note</i>]</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>path <a name="read_symlink">read_symlink</a>(const path&amp; p);
 path read_symlink(const path&amp; p, system::error_code&amp; ec);</pre>
@@ -2717,9 +2464,7 @@
   <p dir="ltr"><i>Returns:</i>&nbsp; If <code>p</code> resolves to a symbolic
   link, a <code>path</code> object containing the contents of that symbolic
   link. Otherwise an empty <code>path</code> object.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>. [<i>Note:</i> It is an error if <code>p</code> does not
+ <p><i>Throws:</i> As specified in Error reporting. [<i>Note:</i> It is an error if <code>p</code> does not
   resolve to a symbolic link. <i>-- end note</i>]</p>
 </blockquote>
 <pre>bool <a name="remove">remove</a>(const path&amp; p);
@@ -2727,8 +2472,7 @@
 <blockquote>
   <p><i>Effects:</i>&nbsp; If <code>exists(symlink_status(p,ec))</code>, it is
   removed
- as if by<i> POSIX </i><code>
- remove()</code>.</p>
+ as if by<i> POSIX </i><code>remove()</code>.</p>
   <blockquote>
   <p>[<i>Note:</i> A symbolic link is itself removed, rather than the file it
   resolves to being removed. <i>-- end note</i>]</p>
@@ -2736,34 +2480,26 @@
   <p><i>Postcondition:</i> <code>!exists(symlink_status(p))</code>.</p>
   <p><i>Returns:</i>&nbsp; <code>false</code> if p did not exist in the first
   place, otherwise <code>true</code>.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>uintmax_t <a name="remove_all">remove_all</a>(const path&amp; p);
 uintmax_t <a name="remove_all2">remove_all</a>(const path&amp; p, system::error_code&amp; ec);</pre>
 <blockquote>
   <p><i>Effects:</i>&nbsp; Recursively deletes the contents of p if it exists,
   then deletes file <code>p</code> itself,
- as if by<i> POSIX </i><code>
- remove()</code>.</p>
+ as if by<i> POSIX </i><code>remove()</code>.</p>
   <blockquote>
   <p>[<i>Note:</i> A symbolic link is itself removed, rather than the file it
   resolves to being removed. <i>-- end note</i>]</p>
   </blockquote>
   <p><i>Postcondition:</i> <code>!exists(p)</code></p>
   <p><i>Returns:</i> The number of files removed.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>void <a name="rename">rename</a>(const path&amp; old_p, const path&amp; new_p);
 void <a name="rename2">rename</a>(const path&amp; old_p, const path&amp; new_p, system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Effects:</i> Renames <code>old_p</code> to <code>new_p</code>, as if by
- <i>POSIX</i> <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/rename.html">
- rename()</a></code>.</p>
+ <p><i>Effects:</i> Renames <code>old_p</code> to <code>new_p</code>, as if by <i>POSIX</i> <code>rename()</code>.</p>
   <blockquote>
   <p>[<i>Note:</i> If <code>old_p</code> and <code>new_p</code> resolve to the
   same existing file, no action is taken. Otherwise, if <code>new_p</code> resolves to an
@@ -2771,39 +2507,24 @@
   existing directory, it is removed if empty on POSIX but is an error on Windows. A symbolic link is itself renamed, rather than
   the file it resolves to being renamed. <i>-- end note</i>]</p>
   </blockquote>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>void <a name="resize_file">resize_file</a>(const path&amp; p, uintmax_t new_size);
 void <a name="resize_file2">resize_file</a>(const path&amp; p, uintmax_t new_size, system::error_code&amp; ec);</pre>
 <blockquote>
 <p><i>Postcondition:</i> <code>file_size() == new_size</code>.</p>
-<p><i>Throws:</i> As specified in
-<a href="#Error-reporting">
-Error reporting</a>.</p>
+<p><i>Throws:</i> As specified in Error reporting.</p>
   <p><i>Remarks:</i> Achieves its postconditions as if by
- POSIX <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/truncate.html">
- truncate()</a></code>.</p>
+ POSIX <code>truncate()</code>.</p>
 </blockquote>
 <pre>space_info <a name="space">space</a>(const path&amp; p);
 space_info <a name="space2">space</a>(const path&amp; p, system::error_code&amp; ec);</pre>
 <blockquote>
- <p><i>Returns:</i> An object of type <code>
- space_info</code>. The value of the <code>space_info</code> object is determined as if by
- using <i>POSIX</i> <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/statvfs.html" style="text-decoration: none">
- statvfs()</a></code> to obtain a <i>POSIX</i> struct <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/statvfs.h.html" style="text-decoration: none">
- statvfs</a></code>, and then multiplying its <code>f_blocks</code>, <code>
- f_bfree</code>, and <code>f_bavail</code> members by its <code>f_frsize</code>
- member, and assigning the results to the <code>capacity</code>, <code>free</code>,
+ <p><i>Returns:</i> An object of type <code>space_info</code>. The value of the <code>space_info</code> object is determined as if by
+ using <i>POSIX</i> <code>statvfs()</code> to obtain a <i>POSIX</i> struct <code>statvfs</code>, and then multiplying its <code>f_blocks</code>, <code>f_bfree</code>, and <code>f_bavail</code> members by its <code>f_frsize</code> member, and assigning the results to the <code>capacity</code>, <code>free</code>,
   and <code>available</code> members respectively. Any members for which the
   value cannot be determined shall be set to -1.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
 </blockquote>
 <pre>file_status <a name="status">status</a>(const path&amp; p);</pre>
 <blockquote>
@@ -2817,9 +2538,7 @@
   </blockquote>
   <p><i>Returns:</i> See above.</p>
   <p><i>Throws:</i> <code>filesystem_error</code>.
-[<i>Note:</i> <code>result</code> values of <code>
- file_status(file_not_found)</code>and <code>
- file_status(type_unknown)</code> are not considered failures and do not
+[<i>Note:</i> <code>result</code> values of <code>file_status(file_not_found)</code>and <code>file_status(type_unknown)</code> are not considered failures and do not
   cause an exception to be
 thrown.<i> -- end note</i>] </p>
   </blockquote>
@@ -2828,15 +2547,12 @@
   <p><i>Effects: </i></p>
   <blockquote>
     <p>If possible, determines the attributes
- of the file
- <code>p</code> resolves to, as if by<i> POSIX </i> <code>
- stat()</code>.</p>
+ of the file <code>p</code> resolves to, as if by<i> POSIX </i><code>stat()</code>.</p>
       If, during attribute determination, the underlying file system API reports
     an error, sets <code>ec</code> to indicate the specific error reported.
     Otherwise, <code>ec.clear()</code>.<blockquote>
       <p>[<i>Note:</i> This allows users to inspect the specifics of underlying
- API errors even when the value returned by <code>status()</code> is not <code>
- file_status(status_error)</code>.&nbsp; <i>--end note</i>]</p>
+ API errors even when the value returned by <code>status()</code> is not <code>file_status(status_error)</code>.&nbsp; <i>--end note</i>]</p>
     </blockquote>
     </blockquote>
   <p><i>Returns:</i></p>
@@ -2861,11 +2577,8 @@
       file_status(status_error)</code>.</li>
     </ul>
         <blockquote>
- <p>[<i>Note:</i> These semantics distinguish between
- <code>p</code> being known not to exist,
- <code>p</code> existing but not being able to determine its attributes,
- and there being an error that prevents even knowing if
- <code>p</code> exists. These
+ <p>[<i>Note:</i> These semantics distinguish between <code>p</code> being known not to exist, <code>p</code> existing but not being able to determine its attributes,
+ and there being an error that prevents even knowing if <code>p</code> exists. These
         distinctions are important to some use cases.&nbsp;<i>--end note</i>]</p>
     </blockquote>
     <p>Otherwise,</p>
@@ -2918,24 +2631,18 @@
 </blockquote>
 <pre>bool <a name="status_known">status_known</a>(file_status s) noexcept;</pre>
 <blockquote>
- <p><i>Returns:</i>
- <code>s.type() != status_error</code></p>
+ <p><i>Returns:</i> <code>s.type() != status_error</code></p>
 </blockquote>
 <pre>file_status <a name="symlink_status">symlink_status</a>(const path&amp; p);
 file_status <a name="symlink_status2">symlink_status</a>(const path&amp; p, system::error_code&amp; ec) noexcept;</pre>
 <blockquote>
   <p><i>Effects:</i>&nbsp; Same as status(), above,
   except that the attributes
- of
- <code>p</code> are determined as if by<i> POSIX </i> <code>
- <a href="http://www.opengroup.org/onlinepubs/000095399/functions/lstat.html">
- lstat()</a></code>.</p>
+ of <code>p</code> are determined as if by<i> POSIX </i><code>lstat()</code>.</p>
 </blockquote>
 <blockquote>
       <p><i>Returns:</i> Same as status(), above, except
- that if the attributes indicate a symbolic link, as if by <i>POSIX</i>
- <a class="external" href="http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/stat.h.html">
- S_ISLNK()</a>, return <code>file_status(symlink_file)</code>.</p>
+ that if the attributes indicate a symbolic link, as if by <i>POSIX</i> <a class="external" href="http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/stat.h.html">S_ISLNK()</a>, return <code>file_status(symlink_file)</code>.</p>
       <p><i>Remarks:</i> Pathname resolution terminates if <code>p</code> names a symbolic link.</p>
   <p><i>Throws:</i> <code>filesystem_error</code>; overload with <code>error_code&amp;</code> throws
   nothing.</p>
@@ -2947,25 +2654,17 @@
   same rules used by the operating system to resolve a path passed as the
   filename argument to standard library open functions.</p>
   <p><i>Returns:</i> The composed path.</p>
- <p><i>Postcondition:</i> For the returned path, <code>rp,</code> <code>
- rp.is_absolute()</code> is true.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
- <p>[<i>Note:</i> For <i>POSIX</i>, <code>system_complete(p)</code> has the same semantics as
- <code>complete(p, current_path())</code>.</p>
+ <p><i>Postcondition:</i> For the returned path, <code>rp,</code> <code>rp.is_absolute()</code> is true.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
+ <p>[<i>Note:</i> For <i>POSIX</i>, <code>system_complete(p)</code> has the same semantics as <code>complete(p, current_path())</code>.</p>
   <p><a name="windows_effects">For <i>Windows</i></a>, <code>system_complete(p)</code> has the
- same semantics as <code>complete(ph, current_path())</code> if
- <code>p.is_absolute() || !p.has_root_name()</code> or <code>p</code> and <code>base</code> have the same
- <code>root_name()</code>.
- Otherwise it acts like <code>complete(p, kinky)</code>, where <code>kinky</code>
- is the current directory for the <code>p.root_name()</code> drive. This will
+ same semantics as <code>complete(ph, current_path())</code> if <code>p.is_absolute() || !p.has_root_name()</code> or <code>p</code> and <code>base</code> have the same <code>root_name()</code>.
+ Otherwise it acts like <code>complete(p, kinky)</code>, where <code>kinky</code> is the current directory for the <code>p.root_name()</code> drive. This will
   be the current directory of that drive the last time it was set, and thus may
   be <b>residue left over from a prior program</b> run by the command
   processor! Although these semantics are often useful, they are also very
   error-prone.</p>
- <p>See <a href="#complete_note">
- <i>complete()</i> note</a> for usage suggestions. <i>-- end note</i>]</p>
+ <p>See complete() note for usage suggestions. <i>-- end note</i>]</p>
 </blockquote>
 <pre>path <a name="temp_directory_path">temp_directory_path</a>();
 path temp_directory_path(system::error_code&amp; ec);</pre>
@@ -2977,8 +2676,7 @@
   <p><i>POSIX:</i> The path supplied by the first environment variable found in the
   list TMPDIR, TMP, TEMP, TEMPDIR. If none of these are found, <code>&quot;/tmp&quot;</code>.</p>
   <p><i>Windows:</i> The path reported by the <i>Windows</i> <code>GetTempPath</code> API function.</p>
- <p><i>Throws:</i> As specified in <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   <p>[<i>Note: </i>The <code>temp_directory_path()</code> name was chosen to emphasize that the return is a
   path, not just a single directory name.&nbsp; <i>-- end note</i>]</p>
 </blockquote>
@@ -2996,13 +2694,9 @@
   <p><i>Returns:</i> A path identical to <code>model</code>, except that each
   occurrence of a percent sign character is replaced by a random hexadecimal
   digit character in the range 0-9, a-f.</p>
- <p><i>Throws:</i> As specified in
- <a href="#Error-reporting">
- Error reporting</a>.</p>
+ <p><i>Throws:</i> As specified in Error reporting.</p>
   <p><i>Remarks:</i> Implementations are encouraged to obtain the required
- randomness via a
- <a href="http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator">
- cryptographically secure pseudo-random number generator</a>, such as one
+ randomness via a cryptographically secure pseudo-random number generator, such as one
   provided by the operating system. [<i>Note</i>: Such generators may block
   until sufficient entropy develops. <i>--end note</i>]</p>
 </blockquote>
@@ -3010,9 +2704,7 @@
 
 <h2><a name="Path-decomposition-table">Path decomposition table</a></h2>
 <p>The table is generated by a program compiled with the Boost implementation.</p>
-<p>Shaded entries indicate cases where <i>POSIX</i> and <i>Windows</i>
-implementations yield different results. The top value is the
-<i>POSIX</i> result and the bottom value is the <i>Windows</i> result. <br>
+<p>Shaded entries indicate cases where <i>POSIX</i> and <i>Windows</i> implementations yield different results. The top value is the <i>POSIX</i> result and the bottom value is the <i>Windows</i> result. <br>
 <table border="1" cellspacing="0" cellpadding="5">
 <p>
 <tr><td><b>Constructor<br>argument</b></td>
@@ -3516,8 +3208,7 @@
 <p>The Windows API has many functions that also have Unicode versions to permit
 an extended-length path for a maximum total path length of 32,767 characters.
 ... To specify an extended-length path, use the <b>&quot;\\?\&quot; prefix</b>. For
-example, &quot;\\?\D:\<em>very long path</em>&quot;.&nbsp;
-<i>[C++ string literals require backslashes be doubled, of course.]</i></p>
+example, &quot;\\?\D:\<em>very long path</em>&quot;.&nbsp; <i>[C++ string literals require backslashes be doubled, of course.]</i></p>
 </blockquote>
 <p>Because most Boost.Filesystem operational functions just pass the contents of
 a class path object to the Windows API, they do work with the extended-length
@@ -3544,9 +3235,7 @@
 through to completion. She gave me the strength to continue after a difficult
 year of cancer treatment in the middle of it all.</p>
 <p>Many people contributed technical comments, ideas, and suggestions to the
-Boost Filesystem Library. See
-<a href="http://www.boost.org/libs/filesystem/doc/index.htm#Acknowledgements">
-http://www.boost.org/libs/filesystem/doc/index.htm#Acknowledgements>.</p>
+Boost Filesystem Library. See
http://www.boost.org/libs/filesystem/doc/index.htm#Acknowledgements.</p>
 <p>Dietmar Kuehl contributed the original Boost Filesystem Library directory_iterator design. Peter Dimov, Walter Landry, Rob Stewart, and Thomas
 Witt were particularly helpful in refining the library.</p>
 <p>The create_directories, extension, basename, and replace_extension functions
@@ -3565,21 +3254,14 @@
     <td width="84%">ISO/IEC 9945:2003, IEEE&nbsp;Std&nbsp;1003.1-2001, and The Open Group
     Base Specifications, Issue 6. Also known as The Single Unix<font face="Times New Roman">®
     Specification, Version 3. Available from each of the organizations involved
- in its creation. For example, read online or download from
- <a href="http://www.unix.org/single_unix_specification/">
- www.unix.org/single_unix_specification/</a>.</font> The ISO JTC1/SC22/WG15 -
- POSIX homepage is <a href="http://www.open-std.org/jtc1/sc22/WG15/">
- www.open-std.org/jtc1/sc22/WG15/</a></td>
+ in its creation. For example, read online or download from www.unix.org/single_unix_specification/.</font> The ISO JTC1/SC22/WG15 -
+ POSIX homepage is www.open-std.org/jtc1/sc22/WG15/</td>
   </tr>
   <tr>
     <td width="16%" valign="top">[Abrahams]</td>
- <td width="84%">Dave Abrahams, Error and Exception Handling,
- <a href="http://www.boost.org/more/error_handling.html">
- www.boost.org/more/error_handling.html</a></td>
+ <td width="84%">Dave Abrahams, Error and Exception Handling, www.boost.org/more/error_handling.html</td>
   </tr>
 </table>
 <hr>
 $snippet backmatter "$SNIPPET_FILE;"
-</body>
-
-</html>
\ No newline at end of file
+</body></html>
\ No newline at end of file

Modified: trunk/libs/filesystem/src/path.cpp
==============================================================================
--- trunk/libs/filesystem/src/path.cpp (original)
+++ trunk/libs/filesystem/src/path.cpp 2012-03-31 11:53:24 EDT (Sat, 31 Mar 2012)
@@ -87,6 +87,11 @@
   const fs::path dot_path(L".");
   const fs::path dot_dot_path(L"..");
 
+ inline bool is_letter(wchar_t c)
+ {
+ return (c >= L'a' && c <=L'z') || (c >= L'A' && c <=L'Z');
+ }
+
 # else
 
   const char separator = '/';
@@ -109,7 +114,7 @@
       ;
   }
 
- bool is_non_root_separator(const string_type& str, size_type pos);
+ bool is_root_separator(const string_type& str, size_type pos);
     // pos is position of the separator
 
   size_type filename_pos(const string_type& str,
@@ -348,7 +353,7 @@
     return (m_pathname.size()
               && pos
               && is_separator(m_pathname[pos])
- && is_non_root_separator(m_pathname, pos))
+ && !is_root_separator(m_pathname, pos))
       ? dot_path
       : path(m_pathname.c_str() + pos);
   }
@@ -452,9 +457,9 @@
 namespace
 {
 
- // is_non_root_separator -------------------------------------------------//
+ // is_root_separator ---------------------------------------------------------------//
 
- bool is_non_root_separator(const string_type & str, size_type pos)
+ bool is_root_separator(const string_type & str, size_type pos)
     // pos is position of the separator
   {
     BOOST_ASSERT_MSG(!str.empty() && is_separator(str[pos]),
@@ -464,13 +469,21 @@
     while (pos > 0 && is_separator(str[pos-1]))
       --pos;
 
- return pos != 0
- && (pos <= 2 || !is_separator(str[1])
- || str.find_first_of(separators, 2) != pos)
-# ifdef BOOST_WINDOWS_API
- && (pos !=2 || str[1] != colon)
-# endif
- ;
+ // "/" [...]
+ if (pos == 0)
+ return true;
+
+# ifdef BOOST_WINDOWS_API
+ // "c:/" [...]
+ if (pos == 2 && is_letter(str[0]) && str[1] == colon)
+ return true;
+# endif
+
+ // "//" name "/"
+ if (pos < 3 || !is_separator(str[0]) || !is_separator(str[1]))
+ return false;
+
+ return str.find_first_of(separators, 2) == pos;
   }
 
   // filename_pos --------------------------------------------------------------------//
@@ -615,7 +628,32 @@
     return;
   }
 
-} // unnammed namespace
+} // unnamed namespace
+
+
+namespace boost
+{
+namespace filesystem
+{
+ namespace detail
+ {
+ BOOST_FILESYSTEM_DECL
+ int lex_compare(path::iterator first1, path::iterator last1,
+ path::iterator first2, path::iterator last2)
+ {
+ for (; first1 != last1 && first2 != last2;)
+ {
+ if (first1->native() < first2->native()) return -1;
+ if (first2->native() < first1->native()) return 1;
+ BOOST_ASSERT(first2->native() == first1->native());
+ ++first1;
+ ++first2;
+ }
+ if (first1 == last1 && first2 == last2)
+ return 0;
+ return first1 == last1 ? -1 : 1;
+ }
+ }
 
 //--------------------------------------------------------------------------------------//
 // //
@@ -623,10 +661,6 @@
 // //
 //--------------------------------------------------------------------------------------//
 
-namespace boost
-{
-namespace filesystem
-{
   path::iterator path::begin() const
   {
     iterator itr;
@@ -652,13 +686,14 @@
     BOOST_ASSERT_MSG(it.m_pos < it.m_path_ptr->m_pathname.size(),
       "path::basic_iterator increment past end()");
 
- // increment to position past current element
+ // increment to position past current element; if current element is implicit dot,
+ // this will cause it.m_pos to represent the end iterator
     it.m_pos += it.m_element.m_pathname.size();
 
- // if end reached, create end basic_iterator
+ // if the end is reached, we are done
     if (it.m_pos == it.m_path_ptr->m_pathname.size())
     {
- it.m_element.clear();
+ it.m_element.clear(); // aids debugging, may release unneeded memory
       return;
     }
 
@@ -683,14 +718,14 @@
         return;
       }
 
- // bypass separators
+ // skip separators until it.m_pos points to the start of the next element
       while (it.m_pos != it.m_path_ptr->m_pathname.size()
         && is_separator(it.m_path_ptr->m_pathname[it.m_pos]))
         { ++it.m_pos; }
 
       // detect trailing separator, and treat it as ".", per POSIX spec
       if (it.m_pos == it.m_path_ptr->m_pathname.size()
- && is_non_root_separator(it.m_path_ptr->m_pathname, it.m_pos-1))
+ && !is_root_separator(it.m_path_ptr->m_pathname, it.m_pos-1))
       {
         --it.m_pos;
         it.m_element = dot_path;
@@ -698,9 +733,10 @@
       }
     }
 
- // get next element
+ // get m_element
     size_type end_pos(it.m_path_ptr->m_pathname.find_first_of(separators, it.m_pos));
- if (end_pos == string_type::npos) end_pos = it.m_path_ptr->m_pathname.size();
+ if (end_pos == string_type::npos)
+ end_pos = it.m_path_ptr->m_pathname.size();
     it.m_element = it.m_path_ptr->m_pathname.substr(it.m_pos, end_pos - it.m_pos);
   }
 
@@ -714,7 +750,7 @@
     if (it.m_pos == it.m_path_ptr->m_pathname.size()
       && it.m_path_ptr->m_pathname.size() > 1
       && is_separator(it.m_path_ptr->m_pathname[it.m_pos-1])
- && is_non_root_separator(it.m_path_ptr->m_pathname, it.m_pos-1)
+ && !is_root_separator(it.m_path_ptr->m_pathname, it.m_pos-1)
        )
     {
       --it.m_pos;

Modified: trunk/libs/filesystem/test/path_test.cpp
==============================================================================
--- trunk/libs/filesystem/test/path_test.cpp (original)
+++ trunk/libs/filesystem/test/path_test.cpp 2012-03-31 11:53:24 EDT (Sat, 31 Mar 2012)
@@ -208,8 +208,11 @@
     itr = itr_ck.begin();
     PATH_TEST_EQ(itr->string(), "/");
     PATH_TEST_EQ(*++itr, "foo");
+ BOOST_TEST(itr != itr_ck.end());
     PATH_TEST_EQ(*++itr, "bar");
+ BOOST_TEST(itr != itr_ck.end());
     PATH_TEST_EQ(*++itr, ".");
+ BOOST_TEST(itr != itr_ck.end()); // verify the . isn't also seen as end()
     BOOST_TEST(++itr == itr_ck.end());
     PATH_TEST_EQ(*--itr, ".");
     PATH_TEST_EQ(*--itr, "bar");
@@ -223,12 +226,27 @@
     PATH_TEST_EQ(*++itr, "f");
     PATH_TEST_EQ(*++itr, "b");
     PATH_TEST_EQ(*++itr, ".");
+ BOOST_TEST(itr != itr_ck.end()); // verify the . isn't also seen as end()
     BOOST_TEST(++itr == itr_ck.end());
     PATH_TEST_EQ(*--itr, ".");
     PATH_TEST_EQ(*--itr, "b");
     PATH_TEST_EQ(*--itr, "f");
     PATH_TEST_EQ(*--itr, "/");
 
+ // POSIX says treat "a/b/" as "a/b/."
+ // Although similar to the prior test case, this failed the ". isn't end" test due to
+ // a bug while the prior case did not fail.
+ itr_ck = "a/b/";
+ itr = itr_ck.begin();
+ PATH_TEST_EQ(*itr, "a");
+ PATH_TEST_EQ(*++itr, "b");
+ PATH_TEST_EQ(*++itr, ".");
+ BOOST_TEST(itr != itr_ck.end()); // verify the . isn't also seen as end()
+ BOOST_TEST(++itr == itr_ck.end());
+ PATH_TEST_EQ(*--itr, ".");
+ PATH_TEST_EQ(*--itr, "b");
+ PATH_TEST_EQ(*--itr, "a");
+
     itr_ck = "//net";
     itr = itr_ck.begin();
     // two leading slashes are permitted by POSIX (as implementation defined),
@@ -574,10 +592,13 @@
     BOOST_TEST(!(as < acs));
     BOOST_TEST(!(acs < as));
 
- // reality check character set is as expected
+ // character set reality check before lexicographical tests
     BOOST_TEST(std::string("a.b") < std::string("a/b"));
     // verify compare is actually lexicographical
     BOOST_TEST(path("a/b") < path("a.b"));
+ BOOST_TEST(path("a/b") == path("a///b"));
+ BOOST_TEST(path("a/b/") == path("a/b/."));
+ BOOST_TEST(path("a/b") != path("a/b/"));
 
     // make sure the derivative operators also work
 


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