Ticket #3008: fs_gcc44.patch

File fs_gcc44.patch, 8.7 KB (added by anonymous, 13 years ago)
  • boost/filesystem/operations.hpp

     
    659659      { return is_symlink<wpath>( ph ); }
    660660
    661661    inline bool is_empty( const path & ph )
    662       { return is_empty<path>( ph ); }
     662      { return boost::filesystem::is_empty<path>( ph ); }
    663663    inline bool is_empty( const wpath & ph )
    664       { return is_empty<wpath>( ph ); }
     664      { return boost::filesystem::is_empty<wpath>( ph ); }
    665665
    666666    inline bool equivalent( const path & ph1, const path & ph2 )
    667667      { return equivalent<path>( ph1, ph2 ); }
  • libs/filesystem/test/path_test.cpp

     
    2727
    2828namespace fs = boost::filesystem;
    2929using boost::filesystem::path;
    30 using boost::next;
    31 using boost::prior;
    3230
     31
    3332#include <boost/detail/lightweight_test.hpp>
    3433
    3534#define PATH_CHECK( a, b ) check( a, b, __LINE__ )
     
    480479
    481480  itr_ck = "foo";
    482481  BOOST_TEST( *itr_ck.begin() == std::string( "foo" ) );
    483   BOOST_TEST( next( itr_ck.begin() ) == itr_ck.end() );
    484   BOOST_TEST( *prior( itr_ck.end() ) == std::string( "foo" ) );
    485   BOOST_TEST( prior( itr_ck.end() ) == itr_ck.begin() );
     482  BOOST_TEST( boost::next( itr_ck.begin() ) == itr_ck.end() );
     483  BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
     484  BOOST_TEST( boost::prior( itr_ck.end() ) == itr_ck.begin() );
    486485
    487486  itr_ck = path( "/foo" );
    488487  BOOST_TEST( *itr_ck.begin() == std::string( "/" ) );
    489   BOOST_TEST( *next( itr_ck.begin() ) == std::string( "foo" ) );
    490   BOOST_TEST( next(next( itr_ck.begin() )) == itr_ck.end() );
    491   BOOST_TEST( next( itr_ck.begin() ) == prior( itr_ck.end() ) );
    492   BOOST_TEST( *prior( itr_ck.end() ) == std::string( "foo" ) );
    493   BOOST_TEST( *prior(prior( itr_ck.end() )) == std::string( "/" ) );
    494   BOOST_TEST( prior(prior( itr_ck.end() )) == itr_ck.begin() );
     488  BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "foo" ) );
     489  BOOST_TEST( boost::next(boost::next( itr_ck.begin() )) == itr_ck.end() );
     490  BOOST_TEST( boost::next( itr_ck.begin() ) == boost::prior( itr_ck.end() ) );
     491  BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
     492  BOOST_TEST( *boost::prior(boost::prior( itr_ck.end() )) == std::string( "/" ) );
     493  BOOST_TEST( boost::prior(boost::prior( itr_ck.end() )) == itr_ck.begin() );
    495494
    496495  itr_ck = "/foo/bar";
    497496  itr = itr_ck.begin();
     
    11061105
    11071106    itr_ck = path( "c:" );
    11081107    BOOST_TEST( *itr_ck.begin() == std::string( "c:" ) );
    1109     BOOST_TEST( next( itr_ck.begin() ) == itr_ck.end() );
    1110     BOOST_TEST( prior( itr_ck.end() ) == itr_ck.begin() );
    1111     BOOST_TEST( *prior( itr_ck.end() ) == std::string( "c:" ) );
     1108    BOOST_TEST( boost::next( itr_ck.begin() ) == itr_ck.end() );
     1109    BOOST_TEST( boost::prior( itr_ck.end() ) == itr_ck.begin() );
     1110    BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "c:" ) );
    11121111
    11131112    itr_ck = path( "c:/" );
    11141113    BOOST_TEST( *itr_ck.begin() == std::string( "c:" ) );
    1115     BOOST_TEST( *next( itr_ck.begin() ) == std::string( "/" ) );
    1116     BOOST_TEST( next( next( itr_ck.begin() )) == itr_ck.end() );
    1117     BOOST_TEST( prior( prior( itr_ck.end() )) == itr_ck.begin() );
    1118     BOOST_TEST( *prior( itr_ck.end() ) == std::string( "/" ) );
    1119     BOOST_TEST( *prior( prior( itr_ck.end() )) == std::string( "c:" ) );
     1114    BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "/" ) );
     1115    BOOST_TEST( boost::next( boost::next( itr_ck.begin() )) == itr_ck.end() );
     1116    BOOST_TEST( boost::prior( boost::prior( itr_ck.end() )) == itr_ck.begin() );
     1117    BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "/" ) );
     1118    BOOST_TEST( *boost::prior( boost::prior( itr_ck.end() )) == std::string( "c:" ) );
    11201119
    11211120    itr_ck = path( "c:foo" );
    11221121    BOOST_TEST( *itr_ck.begin() == std::string( "c:" ) );
    1123     BOOST_TEST( *next( itr_ck.begin() ) == std::string( "foo" ) );
    1124     BOOST_TEST( next(next( itr_ck.begin() )) == itr_ck.end() );
    1125     BOOST_TEST( prior(prior( itr_ck.end() )) == itr_ck.begin() );
    1126     BOOST_TEST( *prior( itr_ck.end() ) == std::string( "foo" ) );
    1127     BOOST_TEST( *prior(prior( itr_ck.end() )) == std::string( "c:" ) );
     1122    BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "foo" ) );
     1123    BOOST_TEST( boost::next(boost::next( itr_ck.begin() )) == itr_ck.end() );
     1124    BOOST_TEST( boost::prior(boost::prior( itr_ck.end() )) == itr_ck.begin() );
     1125    BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
     1126    BOOST_TEST( *boost::prior(boost::prior( itr_ck.end() )) == std::string( "c:" ) );
    11281127
    11291128    itr_ck = path( "c:/foo" );
    11301129    BOOST_TEST( *itr_ck.begin() == std::string( "c:" ) );
    1131     BOOST_TEST( *next( itr_ck.begin() ) == std::string( "/" ) );
    1132     BOOST_TEST( *next( next( itr_ck.begin() )) == std::string( "foo" ) );
    1133     BOOST_TEST( next( next( next( itr_ck.begin() ))) == itr_ck.end() );
    1134     BOOST_TEST( prior( prior( prior( itr_ck.end() ))) == itr_ck.begin() );
    1135     BOOST_TEST( *prior( itr_ck.end() ) == std::string( "foo" ) );
    1136     BOOST_TEST( *prior( prior( itr_ck.end() )) == std::string( "/" ) );
    1137     BOOST_TEST( *prior( prior( prior( itr_ck.end() ))) == std::string( "c:" ) );
     1130    BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "/" ) );
     1131    BOOST_TEST( *boost::next( boost::next( itr_ck.begin() )) == std::string( "foo" ) );
     1132    BOOST_TEST( boost::next( boost::next( boost::next( itr_ck.begin() ))) == itr_ck.end() );
     1133    BOOST_TEST( boost::prior( boost::prior( boost::prior( itr_ck.end() ))) == itr_ck.begin() );
     1134    BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
     1135    BOOST_TEST( *boost::prior( boost::prior( itr_ck.end() )) == std::string( "/" ) );
     1136    BOOST_TEST( *boost::prior( boost::prior( boost::prior( itr_ck.end() ))) == std::string( "c:" ) );
    11381137
    11391138    itr_ck = path( "//net" );
    11401139    BOOST_TEST( *itr_ck.begin() == std::string( "//net" ) );
    1141     BOOST_TEST( next( itr_ck.begin() ) == itr_ck.end() );
    1142     BOOST_TEST( prior( itr_ck.end() ) == itr_ck.begin() );
    1143     BOOST_TEST( *prior( itr_ck.end() ) == std::string( "//net" ) );
     1140    BOOST_TEST( boost::next( itr_ck.begin() ) == itr_ck.end() );
     1141    BOOST_TEST( boost::prior( itr_ck.end() ) == itr_ck.begin() );
     1142    BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "//net" ) );
    11441143
    11451144    itr_ck = path( "//net/" );
    11461145    CHECK_EQUAL( *itr_ck.begin(), "//net" );
    1147     CHECK_EQUAL( *next( itr_ck.begin() ), "/" );
    1148     BOOST_TEST( next(next( itr_ck.begin() )) == itr_ck.end() );
    1149     BOOST_TEST( prior(prior( itr_ck.end() )) == itr_ck.begin() );
    1150     CHECK_EQUAL( *prior( itr_ck.end() ), "/" );
    1151     CHECK_EQUAL( *prior(prior( itr_ck.end() )), "//net" );
     1146    CHECK_EQUAL( *boost::next( itr_ck.begin() ), "/" );
     1147    BOOST_TEST( boost::next(boost::next( itr_ck.begin() )) == itr_ck.end() );
     1148    BOOST_TEST( boost::prior(boost::prior( itr_ck.end() )) == itr_ck.begin() );
     1149    CHECK_EQUAL( *boost::prior( itr_ck.end() ), "/" );
     1150    CHECK_EQUAL( *boost::prior(boost::prior( itr_ck.end() )), "//net" );
    11521151
    11531152    itr_ck = path( "//net/foo" );
    11541153    BOOST_TEST( *itr_ck.begin() == std::string( "//net" ) );
    1155     BOOST_TEST( *next( itr_ck.begin() ) == std::string( "/" ) );
    1156     BOOST_TEST( *next(next( itr_ck.begin() )) == std::string( "foo" ) );
    1157     BOOST_TEST( next(next(next( itr_ck.begin() ))) == itr_ck.end() );
    1158     BOOST_TEST( prior(prior(prior( itr_ck.end() ))) == itr_ck.begin() );
    1159     BOOST_TEST( *prior( itr_ck.end() ) == std::string( "foo" ) );
    1160     BOOST_TEST( *prior(prior( itr_ck.end() )) == std::string( "/" ) );
    1161     BOOST_TEST( *prior(prior(prior( itr_ck.end() ))) == std::string( "//net" ) );
     1154    BOOST_TEST( *boost::next( itr_ck.begin() ) == std::string( "/" ) );
     1155    BOOST_TEST( *boost::next(boost::next( itr_ck.begin() )) == std::string( "foo" ) );
     1156    BOOST_TEST( boost::next(boost::next(boost::next( itr_ck.begin() ))) == itr_ck.end() );
     1157    BOOST_TEST( boost::prior(boost::prior(boost::prior( itr_ck.end() ))) == itr_ck.begin() );
     1158    BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "foo" ) );
     1159    BOOST_TEST( *boost::prior(boost::prior( itr_ck.end() )) == std::string( "/" ) );
     1160    BOOST_TEST( *boost::prior(boost::prior(boost::prior( itr_ck.end() ))) == std::string( "//net" ) );
    11621161
    11631162    itr_ck = path( "prn:" );
    11641163    BOOST_TEST( *itr_ck.begin() == std::string( "prn:" ) );
    1165     BOOST_TEST( next( itr_ck.begin() ) == itr_ck.end() );
    1166     BOOST_TEST( prior( itr_ck.end() ) == itr_ck.begin() );
    1167     BOOST_TEST( *prior( itr_ck.end() ) == std::string( "prn:" ) );
     1164    BOOST_TEST( boost::next( itr_ck.begin() ) == itr_ck.end() );
     1165    BOOST_TEST( boost::prior( itr_ck.end() ) == itr_ck.begin() );
     1166    BOOST_TEST( *boost::prior( itr_ck.end() ) == std::string( "prn:" ) );
    11681167  } // Windows
    11691168
    11701169  else