Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55126 - in branches/release: boost/filesystem libs/filesystem/doc libs/filesystem/example libs/filesystem/src libs/filesystem/test libs/filesystem/test/msvc libs/filesystem/test/msvc/mbcopy
From: bdawes_at_[hidden]
Date: 2009-07-23 11:32:04


Author: bemandawes
Date: 2009-07-23 11:32:02 EDT (Thu, 23 Jul 2009)
New Revision: 55126
URL: http://svn.boost.org/trac/boost/changeset/55126

Log:
Merge from trunk
Text files modified:
   branches/release/boost/filesystem/operations.hpp | 18 ++++--
   branches/release/boost/filesystem/path.hpp | 13 ++++
   branches/release/libs/filesystem/doc/reference.html | 19 +++++-
   branches/release/libs/filesystem/example/Jamfile.v2 | 1
   branches/release/libs/filesystem/src/operations.cpp | 43 ++++++++--------
   branches/release/libs/filesystem/test/msvc/boost_filesystem.sln | 10 +++
   branches/release/libs/filesystem/test/msvc/mbcopy/mbcopy.vcproj | 2
   branches/release/libs/filesystem/test/operations_test.cpp | 16 ++++++
   branches/release/libs/filesystem/test/path_test.cpp | 102 ++++++++++++++++++++-------------------
   9 files changed, 139 insertions(+), 85 deletions(-)

Modified: branches/release/boost/filesystem/operations.hpp
==============================================================================
--- branches/release/boost/filesystem/operations.hpp (original)
+++ branches/release/boost/filesystem/operations.hpp 2009-07-23 11:32:02 EDT (Thu, 23 Jul 2009)
@@ -15,6 +15,7 @@
 #define BOOST_FILESYSTEM_OPERATIONS_HPP
 
 #include <boost/filesystem/path.hpp>
+#include <boost/detail/scoped_enum_emulation.hpp>
 
 #include <boost/shared_ptr.hpp>
 #include <boost/utility/enable_if.hpp>
@@ -182,7 +183,7 @@
       BOOST_FILESYSTEM_DECL system::error_code
         rename_api( const std::string & from, const std::string & to );
       BOOST_FILESYSTEM_DECL system::error_code
- copy_file_api( const std::string & from, const std::string & to );
+ copy_file_api( const std::string & from, const std::string & to, bool fail_if_exists );
 
 # if defined(BOOST_WINDOWS_API)
       
@@ -226,7 +227,7 @@
       BOOST_FILESYSTEM_DECL system::error_code
         rename_api( const std::wstring & from, const std::wstring & to );
       BOOST_FILESYSTEM_DECL system::error_code
- copy_file_api( const std::wstring & from, const std::wstring & to );
+ copy_file_api( const std::wstring & from, const std::wstring & to, bool fail_if_exists );
 
 # endif
 # endif
@@ -506,11 +507,16 @@
           from_path, to_path, ec ) );
     }
 
- BOOST_FS_FUNC(void) copy_file( const Path & from_path, const Path & to_path )
+ BOOST_SCOPED_ENUM_START(copy_option)
+ { fail_if_exists, overwrite_if_exists };
+ BOOST_SCOPED_ENUM_END
+
+ BOOST_FS_FUNC(void) copy_file( const Path & from_path, const Path & to_path,
+ BOOST_SCOPED_ENUM(copy_option) option = copy_option::fail_if_exists )
     {
       system::error_code ec( detail::copy_file_api(
         from_path.external_directory_string(),
- to_path.external_directory_string() ) );
+ to_path.external_directory_string(), option == copy_option::fail_if_exists ) );
       if ( ec )
         boost::throw_exception( basic_filesystem_error<Path>(
           "boost::filesystem::copy_file",
@@ -659,9 +665,9 @@
       { return is_symlink<wpath>( ph ); }
 
     inline bool is_empty( const path & ph )
- { return is_empty<path>( ph ); }
+ { return boost::filesystem::is_empty<path>( ph ); }
     inline bool is_empty( const wpath & ph )
- { return is_empty<wpath>( ph ); }
+ { return boost::filesystem::is_empty<wpath>( ph ); }
 
     inline bool equivalent( const path & ph1, const path & ph2 )
       { return equivalent<path>( ph1, ph2 ); }

Modified: branches/release/boost/filesystem/path.hpp
==============================================================================
--- branches/release/boost/filesystem/path.hpp (original)
+++ branches/release/boost/filesystem/path.hpp 2009-07-23 11:32:02 EDT (Thu, 23 Jul 2009)
@@ -208,6 +208,15 @@
           basic_path & append( InputIterator first, InputIterator last );
 # endif
       
+ void clear()
+ {
+# if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, >= 310)
+ m_path.clear();
+# else
+ m_path.erase( m_path.begin(), m_path.end() );
+# endif
+ }
+
       void swap( basic_path & rhs )
       {
         m_path.swap( rhs.m_path );
@@ -930,7 +939,7 @@
     String basic_path<String, Traits>::stem() const
     {
       string_type name = filename();
- typename string_type::size_type n = name.rfind('.');
+ typename string_type::size_type n = name.rfind(dot<path_type>::value);
       return name.substr(0, n);
     }
 
@@ -938,7 +947,7 @@
     String basic_path<String, Traits>::extension() const
     {
       string_type name = filename();
- typename string_type::size_type n = name.rfind('.');
+ typename string_type::size_type n = name.rfind(dot<path_type>::value);
       if (n != string_type::npos)
         return name.substr(n);
       else

Modified: branches/release/libs/filesystem/doc/reference.html
==============================================================================
--- branches/release/libs/filesystem/doc/reference.html (original)
+++ branches/release/libs/filesystem/doc/reference.html 2009-07-23 11:32:02 EDT (Thu, 23 Jul 2009)
@@ -410,8 +410,15 @@
 </span> template &lt;class Path&gt; bool remove(const Path&amp; p);
       template &lt;class Path1, class Path2&gt;
         void rename(const Path1&amp; from_p, const Path2&amp; to_p);
+
+ BOOST_SCOPED_ENUM_START(<a name="copy_option">copy_option</a>)
+ { fail_if_exists, overwrite_if_exists };
+ BOOST_SCOPED_ENUM_END
+
       template &lt;class Path1, class Path2&gt;
- void copy_file(const Path1&amp; from_fp, const Path2&amp; to_fp);
+ void copy_file(const Path1&amp; from_fp, const Path2&amp; to_fp,
+ BOOST_SCOPED_ENUM(copy_option) option=copy_option::fail_if_exists);
+
       template &lt;class Path&gt; Path system_complete(const Path&amp; p);
       template &lt;class Path&gt; Path complete(const Path&amp; p, const Path&amp; base=initial_path&lt;Path&gt;());
 
@@ -1686,7 +1693,7 @@
       cout &lt;&lt; '\n';
     }
   }
- else cout &lt;&lt; (exists(p) : &quot;Found: &quot; : &quot;Not found: &quot;) &lt;&lt; p &lt;&lt; '\n';
+ else cout &lt;&lt; (exists(p) ? &quot;Found: &quot; : &quot;Not found: &quot;) &lt;&lt; p &lt;&lt; '\n';
 
   return 0;
 }</pre>
@@ -2249,7 +2256,9 @@
   existing file, it is removed. A symbolic link is itself renamed, rather than
   the file it resolves to being renamed. <i>-- end note</i>]</p>
 </blockquote>
-<pre>template &lt;class Path1, class Path2&gt; void copy_file(const Path1&amp; from_fp, const Path2&amp; to_fp);</pre>
+<pre>template &lt;class Path1, class Path2&gt;
+ void copy_file(const Path1&amp; from_fp, const Path2&amp; to_fp,
+ BOOST_SCOPED_ENUM(copy_option) option=copy_option::fail_if_exists);</pre>
 <blockquote>
   <p><i>Requires:</i> <code>Path1::external_string_type</code> and <code>
   Path2::external_string_type</code> are the same type. </p>
@@ -2257,7 +2266,7 @@
   resolves to are copied to the file <code>to_fp</code> resolves to.</p>
   <p><i>Throws:</i> <code>basic_filesystem_error&lt;Path&gt;</code> if <code>
   from_fp.empty() || to_fp.empty() ||!exists(from_fp) || !is_regular_file(from_fp)
- || exists(to_fp)</code></p>
+ || (option==copy_option::fail_if_exists &amp;&amp; exists(to_fp))</code></p>
 </blockquote>
 <pre>template &lt;class Path&gt; Path complete(const Path&amp; p, const Path&amp; base=initial_path&lt;Path&gt;());</pre>
 <blockquote>
@@ -3076,7 +3085,7 @@
 <p>Distributed under the Boost Software License, Version 1.0. See
 <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a></p>
 <p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->13 October 2008<!--webbot bot="Timestamp" endspan i-checksum="32600" --></p>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->17 May 2009<!--webbot bot="Timestamp" endspan i-checksum="15147" --></p>
 
 </body>
 

Modified: branches/release/libs/filesystem/example/Jamfile.v2
==============================================================================
--- branches/release/libs/filesystem/example/Jamfile.v2 (original)
+++ branches/release/libs/filesystem/example/Jamfile.v2 2009-07-23 11:32:02 EDT (Thu, 23 Jul 2009)
@@ -9,6 +9,7 @@
 
 project
     : requirements <library>../build//boost_filesystem
+ <library>/boost/system//boost_system
       <hardcode-dll-paths>true
     ;
     

Modified: branches/release/libs/filesystem/src/operations.cpp
==============================================================================
--- branches/release/libs/filesystem/src/operations.cpp (original)
+++ branches/release/libs/filesystem/src/operations.cpp 2009-07-23 11:32:02 EDT (Thu, 23 Jul 2009)
@@ -54,14 +54,7 @@
 
 # if defined(BOOST_WINDOWS_API)
 # include <windows.h>
-# if defined(__BORLANDC__) || defined(__MWERKS__)
-# if defined(__BORLANDC__)
- using std::time_t;
-# endif
-# include <utime.h>
-# else
-# include <sys/utime.h>
-# endif
+# include <ctime> // for time_t
 
 # else // BOOST_POSIX_API
 # include <sys/types.h>
@@ -706,9 +699,9 @@
       }
 
       BOOST_FILESYSTEM_DECL error_code
- copy_file_api( const std::wstring & from, const std::wstring & to )
+ copy_file_api( const std::wstring & from, const std::wstring & to, bool fail_if_exists )
       {
- return error_code( ::CopyFileW( from.c_str(), to.c_str(), /*fail_if_exists=*/true )
+ return error_code( ::CopyFileW( from.c_str(), to.c_str(), fail_if_exists )
           ? 0 : ::GetLastError(), system_category );
       }
 
@@ -886,9 +879,9 @@
       }
 
       BOOST_FILESYSTEM_DECL error_code
- copy_file_api( const std::string & from, const std::string & to )
+ copy_file_api( const std::string & from, const std::string & to, bool fail_if_exists )
       {
- return error_code( ::CopyFileA( from.c_str(), to.c_str(), /*fail_if_exists=*/true )
+ return error_code( ::CopyFileA( from.c_str(), to.c_str(), fail_if_exists )
           ? 0 : ::GetLastError(), system_category );
       }
 
@@ -1203,22 +1196,30 @@
 
       BOOST_FILESYSTEM_DECL error_code
       copy_file_api( const std::string & from_file_ph,
- const std::string & to_file_ph )
+ const std::string & to_file_ph, bool fail_if_exists )
       {
         const std::size_t buf_sz = 32768;
         boost::scoped_array<char> buf( new char [buf_sz] );
         int infile=-1, outfile=-1; // -1 means not open
+
+ // bug fixed: code previously did a stat() on the from_file first, but that
+ // introduced a gratuitous race condition; the stat() is now done after the open()
+
+ if ( (infile = ::open( from_file_ph.c_str(), O_RDONLY )) < 0 )
+ { return error_code( errno, system_category ); }
+
         struct stat from_stat;
+ if ( ::stat( from_file_ph.c_str(), &from_stat ) != 0 )
+ { return error_code( errno, system_category ); }
 
- if ( ::stat( from_file_ph.c_str(), &from_stat ) != 0
- || (infile = ::open( from_file_ph.c_str(),
- O_RDONLY )) < 0
- || (outfile = ::open( to_file_ph.c_str(),
- O_WRONLY | O_CREAT | O_EXCL,
- from_stat.st_mode )) < 0 )
+ int oflag = O_CREAT | O_WRONLY;
+ if ( fail_if_exists ) oflag |= O_EXCL;
+ if ( (outfile = ::open( to_file_ph.c_str(), oflag, from_stat.st_mode )) < 0 )
         {
- if ( infile >= 0 ) ::close( infile );
- return error_code( errno, system_category );
+ int open_errno = errno;
+ BOOST_ASSERT( infile >= 0 );
+ ::close( infile );
+ return error_code( open_errno, system_category );
         }
 
         ssize_t sz, sz_read=1, sz_write;

Modified: branches/release/libs/filesystem/test/msvc/boost_filesystem.sln
==============================================================================
--- branches/release/libs/filesystem/test/msvc/boost_filesystem.sln (original)
+++ branches/release/libs/filesystem/test/msvc/boost_filesystem.sln 2009-07-23 11:32:02 EDT (Thu, 23 Jul 2009)
@@ -62,6 +62,12 @@
                 {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
         EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ticket_2260_test", "ticket_2260_test\ticket_2260_test.vcproj", "{55659CA2-BDEC-427D-8325-C8AE1C9AFF86}"
+ ProjectSection(ProjectDependencies) = postProject
+ {15371D22-F930-4286-9126-C3516E78CB09} = {15371D22-F930-4286-9126-C3516E78CB09}
+ {F31C02C7-63A4-489C-A176-695D68E5BCA4} = {F31C02C7-63A4-489C-A176-695D68E5BCA4}
+ EndProjectSection
+EndProject
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -112,6 +118,10 @@
                 {EA1530CD-7058-4912-8B51-8D55A07F0A1D}.Debug|Win32.Build.0 = Debug|Win32
                 {EA1530CD-7058-4912-8B51-8D55A07F0A1D}.Release|Win32.ActiveCfg = Release|Win32
                 {EA1530CD-7058-4912-8B51-8D55A07F0A1D}.Release|Win32.Build.0 = Release|Win32
+ {55659CA2-BDEC-427D-8325-C8AE1C9AFF86}.Debug|Win32.ActiveCfg = Debug|Win32
+ {55659CA2-BDEC-427D-8325-C8AE1C9AFF86}.Debug|Win32.Build.0 = Debug|Win32
+ {55659CA2-BDEC-427D-8325-C8AE1C9AFF86}.Release|Win32.ActiveCfg = Release|Win32
+ {55659CA2-BDEC-427D-8325-C8AE1C9AFF86}.Release|Win32.Build.0 = Release|Win32
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE

Modified: branches/release/libs/filesystem/test/msvc/mbcopy/mbcopy.vcproj
==============================================================================
--- branches/release/libs/filesystem/test/msvc/mbcopy/mbcopy.vcproj (original)
+++ branches/release/libs/filesystem/test/msvc/mbcopy/mbcopy.vcproj 2009-07-23 11:32:02 EDT (Thu, 23 Jul 2009)
@@ -86,7 +86,6 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
- Description=""
                                 CommandLine=""
                         />
                 </Configuration>
@@ -163,7 +162,6 @@
                         />
                         <Tool
                                 Name="VCPostBuildEventTool"
- Description=""
                                 CommandLine=""
                         />
                 </Configuration>

Modified: branches/release/libs/filesystem/test/operations_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/operations_test.cpp (original)
+++ branches/release/libs/filesystem/test/operations_test.cpp 2009-07-23 11:32:02 EDT (Thu, 23 Jul 2009)
@@ -711,6 +711,22 @@
   BOOST_TEST( fs::exists( d1 / "f2" ) );
   BOOST_TEST( !fs::is_directory( d1 / "f2" ) );
   verify_file( d1 / "f2", "foobar1" );
+
+ bool copy_ex_ok = false;
+ try { fs::copy_file( file_ph, d1 / "f2" ); }
+ catch ( const fs::filesystem_error & ) { copy_ex_ok = true; }
+ BOOST_TEST( copy_ex_ok );
+
+ copy_ex_ok = false;
+ try { fs::copy_file( file_ph, d1 / "f2", fs::copy_option::fail_if_exists ); }
+ catch ( const fs::filesystem_error & ) { copy_ex_ok = true; }
+ BOOST_TEST( copy_ex_ok );
+
+ copy_ex_ok = true;
+ try { fs::copy_file( file_ph, d1 / "f2", fs::copy_option::overwrite_if_exists ); }
+ catch ( const fs::filesystem_error & ) { copy_ex_ok = false; }
+ BOOST_TEST( copy_ex_ok );
+
   std::cout << "copy_file test complete" << std::endl;
 
   // rename() test case numbers refer to operations.htm#rename table

Modified: branches/release/libs/filesystem/test/path_test.cpp
==============================================================================
--- branches/release/libs/filesystem/test/path_test.cpp (original)
+++ branches/release/libs/filesystem/test/path_test.cpp 2009-07-23 11:32:02 EDT (Thu, 23 Jul 2009)
@@ -27,8 +27,7 @@
 
 namespace fs = boost::filesystem;
 using boost::filesystem::path;
-using boost::next;
-using boost::prior;
+
 
 #include <boost/detail/lightweight_test.hpp>
 
@@ -300,6 +299,11 @@
   PATH_CHECK( p5, "/" );
 
 # endif
+ path clear_path( "foo" );
+
+ BOOST_TEST( !clear_path.empty() );
+ clear_path.clear();
+ BOOST_TEST( clear_path.empty() );
 
   BOOST_TEST( p1 != p4 );
   BOOST_TEST( p1.string() == p2.string() );
@@ -480,18 +484,18 @@
 
   itr_ck = "foo";
   BOOST_TEST( *itr_ck.begin() == std::string( "foo" ) );
- BOOST_TEST( next( itr_ck.begin() ) == itr_ck.end() );
- BOOST_TEST( *prior( itr_ck.end() ) == std::string( "foo" ) );
- BOOST_TEST( prior( itr_ck.end() ) == itr_ck.begin() );
+ BOOST_TEST( boost::next( itr_ck.begin() ) == itr_ck.end() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
+ BOOST_TEST( boost::prior( itr_ck.end() ) == itr_ck.begin() );
 
   itr_ck = path( "/foo" );
   BOOST_TEST( *itr_ck.begin() == std::string( "/" ) );
- BOOST_TEST( *next( itr_ck.begin() ) == std::string( "foo" ) );
- BOOST_TEST( next(next( itr_ck.begin() )) == itr_ck.end() );
- BOOST_TEST( next( itr_ck.begin() ) == prior( itr_ck.end() ) );
- BOOST_TEST( *prior( itr_ck.end() ) == std::string( "foo" ) );
- BOOST_TEST( *prior(prior( itr_ck.end() )) == std::string( "/" ) );
- BOOST_TEST( prior(prior( itr_ck.end() )) == itr_ck.begin() );
+ BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "foo" ) );
+ BOOST_TEST( boost::next(boost::next( itr_ck.begin() )) == itr_ck.end() );
+ BOOST_TEST( boost::next( itr_ck.begin() ) == boost::prior( itr_ck.end() ) );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
+ BOOST_TEST( *boost::prior(boost::prior( itr_ck.end() )) == std::string( "/" ) );
+ BOOST_TEST( boost::prior(boost::prior( itr_ck.end() )) == itr_ck.begin() );
 
   itr_ck = "/foo/bar";
   itr = itr_ck.begin();
@@ -1106,65 +1110,65 @@
 
     itr_ck = path( "c:" );
     BOOST_TEST( *itr_ck.begin() == std::string( "c:" ) );
- BOOST_TEST( next( itr_ck.begin() ) == itr_ck.end() );
- BOOST_TEST( prior( itr_ck.end() ) == itr_ck.begin() );
- BOOST_TEST( *prior( itr_ck.end() ) == std::string( "c:" ) );
+ BOOST_TEST( boost::next( itr_ck.begin() ) == itr_ck.end() );
+ BOOST_TEST( boost::prior( itr_ck.end() ) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "c:" ) );
 
     itr_ck = path( "c:/" );
     BOOST_TEST( *itr_ck.begin() == std::string( "c:" ) );
- BOOST_TEST( *next( itr_ck.begin() ) == std::string( "/" ) );
- BOOST_TEST( next( next( itr_ck.begin() )) == itr_ck.end() );
- BOOST_TEST( prior( prior( itr_ck.end() )) == itr_ck.begin() );
- BOOST_TEST( *prior( itr_ck.end() ) == std::string( "/" ) );
- BOOST_TEST( *prior( prior( itr_ck.end() )) == std::string( "c:" ) );
+ BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "/" ) );
+ BOOST_TEST( boost::next( boost::next( itr_ck.begin() )) == itr_ck.end() );
+ BOOST_TEST( boost::prior( boost::prior( itr_ck.end() )) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "/" ) );
+ BOOST_TEST( *boost::prior( boost::prior( itr_ck.end() )) == std::string( "c:" ) );
 
     itr_ck = path( "c:foo" );
     BOOST_TEST( *itr_ck.begin() == std::string( "c:" ) );
- BOOST_TEST( *next( itr_ck.begin() ) == std::string( "foo" ) );
- BOOST_TEST( next(next( itr_ck.begin() )) == itr_ck.end() );
- BOOST_TEST( prior(prior( itr_ck.end() )) == itr_ck.begin() );
- BOOST_TEST( *prior( itr_ck.end() ) == std::string( "foo" ) );
- BOOST_TEST( *prior(prior( itr_ck.end() )) == std::string( "c:" ) );
+ BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "foo" ) );
+ BOOST_TEST( boost::next(boost::next( itr_ck.begin() )) == itr_ck.end() );
+ BOOST_TEST( boost::prior(boost::prior( itr_ck.end() )) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
+ BOOST_TEST( *boost::prior(boost::prior( itr_ck.end() )) == std::string( "c:" ) );
 
     itr_ck = path( "c:/foo" );
     BOOST_TEST( *itr_ck.begin() == std::string( "c:" ) );
- BOOST_TEST( *next( itr_ck.begin() ) == std::string( "/" ) );
- BOOST_TEST( *next( next( itr_ck.begin() )) == std::string( "foo" ) );
- BOOST_TEST( next( next( next( itr_ck.begin() ))) == itr_ck.end() );
- BOOST_TEST( prior( prior( prior( itr_ck.end() ))) == itr_ck.begin() );
- BOOST_TEST( *prior( itr_ck.end() ) == std::string( "foo" ) );
- BOOST_TEST( *prior( prior( itr_ck.end() )) == std::string( "/" ) );
- BOOST_TEST( *prior( prior( prior( itr_ck.end() ))) == std::string( "c:" ) );
+ BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "/" ) );
+ BOOST_TEST( *boost::next( boost::next( itr_ck.begin() )) == std::string( "foo" ) );
+ BOOST_TEST( boost::next( boost::next( boost::next( itr_ck.begin() ))) == itr_ck.end() );
+ BOOST_TEST( boost::prior( boost::prior( boost::prior( itr_ck.end() ))) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
+ BOOST_TEST( *boost::prior( boost::prior( itr_ck.end() )) == std::string( "/" ) );
+ BOOST_TEST( *boost::prior( boost::prior( boost::prior( itr_ck.end() ))) == std::string( "c:" ) );
 
     itr_ck = path( "//net" );
     BOOST_TEST( *itr_ck.begin() == std::string( "//net" ) );
- BOOST_TEST( next( itr_ck.begin() ) == itr_ck.end() );
- BOOST_TEST( prior( itr_ck.end() ) == itr_ck.begin() );
- BOOST_TEST( *prior( itr_ck.end() ) == std::string( "//net" ) );
+ BOOST_TEST( boost::next( itr_ck.begin() ) == itr_ck.end() );
+ BOOST_TEST( boost::prior( itr_ck.end() ) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "//net" ) );
 
     itr_ck = path( "//net/" );
     CHECK_EQUAL( *itr_ck.begin(), "//net" );
- CHECK_EQUAL( *next( itr_ck.begin() ), "/" );
- BOOST_TEST( next(next( itr_ck.begin() )) == itr_ck.end() );
- BOOST_TEST( prior(prior( itr_ck.end() )) == itr_ck.begin() );
- CHECK_EQUAL( *prior( itr_ck.end() ), "/" );
- CHECK_EQUAL( *prior(prior( itr_ck.end() )), "//net" );
+ CHECK_EQUAL( *boost::next( itr_ck.begin() ), "/" );
+ BOOST_TEST( boost::next(boost::next( itr_ck.begin() )) == itr_ck.end() );
+ BOOST_TEST( boost::prior(boost::prior( itr_ck.end() )) == itr_ck.begin() );
+ CHECK_EQUAL( *boost::prior( itr_ck.end() ), "/" );
+ CHECK_EQUAL( *boost::prior(boost::prior( itr_ck.end() )), "//net" );
 
     itr_ck = path( "//net/foo" );
     BOOST_TEST( *itr_ck.begin() == std::string( "//net" ) );
- BOOST_TEST( *next( itr_ck.begin() ) == std::string( "/" ) );
- BOOST_TEST( *next(next( itr_ck.begin() )) == std::string( "foo" ) );
- BOOST_TEST( next(next(next( itr_ck.begin() ))) == itr_ck.end() );
- BOOST_TEST( prior(prior(prior( itr_ck.end() ))) == itr_ck.begin() );
- BOOST_TEST( *prior( itr_ck.end() ) == std::string( "foo" ) );
- BOOST_TEST( *prior(prior( itr_ck.end() )) == std::string( "/" ) );
- BOOST_TEST( *prior(prior(prior( itr_ck.end() ))) == std::string( "//net" ) );
+ BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "/" ) );
+ BOOST_TEST( *boost::next(boost::next( itr_ck.begin() )) == std::string( "foo" ) );
+ BOOST_TEST( boost::next(boost::next(boost::next( itr_ck.begin() ))) == itr_ck.end() );
+ BOOST_TEST( boost::prior(boost::prior(boost::prior( itr_ck.end() ))) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
+ BOOST_TEST( *boost::prior(boost::prior( itr_ck.end() )) == std::string( "/" ) );
+ BOOST_TEST( *boost::prior(boost::prior(boost::prior( itr_ck.end() ))) == std::string( "//net" ) );
 
     itr_ck = path( "prn:" );
     BOOST_TEST( *itr_ck.begin() == std::string( "prn:" ) );
- BOOST_TEST( next( itr_ck.begin() ) == itr_ck.end() );
- BOOST_TEST( prior( itr_ck.end() ) == itr_ck.begin() );
- BOOST_TEST( *prior( itr_ck.end() ) == std::string( "prn:" ) );
+ BOOST_TEST( boost::next( itr_ck.begin() ) == itr_ck.end() );
+ BOOST_TEST( boost::prior( itr_ck.end() ) == itr_ck.begin() );
+ BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "prn:" ) );
   } // Windows
 
   else


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