From: Jonathan Wakely Date: Fri, 5 Apr 2019 16:56:27 +0000 (+0100) Subject: PR libstdc++/89986 export directory_iterator::increment X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=67087c7e53b64dc58a2440903275bd0b9db110df;p=gcc.git PR libstdc++/89986 export directory_iterator::increment PR libstdc++/89986 * config/abi/pre/gnu.ver: Add missing exports. * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test increment member. From-SVN: r270174 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e2aa3962f28..655c3d073a2 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,10 @@ 2019-04-05 Jonathan Wakely + PR libstdc++/89986 + * config/abi/pre/gnu.ver: Add missing exports. + * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test + increment member. + * config/abi/pre/gnu.ver: Export new symbols. * include/bits/fs_dir.h (recursive_directory_iterator::options()) (recursive_directory_iterator::recursion_pending()) diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index 019b581df71..e8cf6f0a4a9 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -2200,13 +2200,14 @@ GLIBCXX_3.4.26 { _ZNSt10filesystem16weakly_canonical*; _ZNKSt10filesystem18directory_iteratordeEv; + _ZNSt10filesystem18directory_iteratorC[12]ERKNS_4pathENS_17directory_optionsEPSt10error_code; + _ZNSt10filesystem18directory_iterator9incrementERSt10error_code; + _ZNSt10filesystem18directory_iteratorppEv; _ZNKSt10filesystem28recursive_directory_iterator7optionsEv; _ZNKSt10filesystem28recursive_directory_iterator5depthEv; _ZNKSt10filesystem28recursive_directory_iterator17recursion_pendingEv; _ZNSt10filesystem28recursive_directory_iterator25disable_recursion_pendingEv; _ZNKSt10filesystem28recursive_directory_iteratordeEv; - _ZNSt10filesystem18directory_iteratorC[12]ERKNS_4pathENS_17directory_optionsEPSt10error_code; - _ZNSt10filesystem18directory_iteratorppEv; _ZNSt10filesystem28recursive_directory_iterator3popERSt10error_code; _ZNSt10filesystem28recursive_directory_iterator3popEv; _ZNSt10filesystem28recursive_directory_iterator9incrementERSt10error_code; @@ -2216,13 +2217,14 @@ GLIBCXX_3.4.26 { _ZNSt10filesystem28recursive_directory_iteratorppEv; _ZNKSt10filesystem7__cxx1118directory_iteratordeEv; + _ZNSt10filesystem7__cxx1118directory_iteratorC[12]ERKNS0_4pathENS_17directory_optionsEPSt10error_code; + _ZNSt10filesystem7__cxx1118directory_iterator9incrementERSt10error_code; + _ZNSt10filesystem7__cxx1118directory_iteratorppEv; _ZNKSt10filesystem7__cxx1128recursive_directory_iterator7optionsEv; _ZNKSt10filesystem7__cxx1128recursive_directory_iterator5depthEv; _ZNKSt10filesystem7__cxx1128recursive_directory_iterator17recursion_pendingEv; _ZNKSt10filesystem7__cxx1128recursive_directory_iteratordeEv; _ZNSt10filesystem7__cxx1128recursive_directory_iterator25disable_recursion_pendingEv; - _ZNSt10filesystem7__cxx1118directory_iteratorC[12]ERKNS0_4pathENS_17directory_optionsEPSt10error_code; - _ZNSt10filesystem7__cxx1118directory_iteratorppEv; _ZNSt10filesystem7__cxx1128recursive_directory_iterator3popERSt10error_code; _ZNSt10filesystem7__cxx1128recursive_directory_iterator3popEv; _ZNSt10filesystem7__cxx1128recursive_directory_iterator9incrementERSt10error_code; diff --git a/libstdc++-v3/testsuite/27_io/filesystem/iterators/directory_iterator.cc b/libstdc++-v3/testsuite/27_io/filesystem/iterators/directory_iterator.cc index 5288bd297bd..492727c75b2 100644 --- a/libstdc++-v3/testsuite/27_io/filesystem/iterators/directory_iterator.cc +++ b/libstdc++-v3/testsuite/27_io/filesystem/iterators/directory_iterator.cc @@ -100,6 +100,15 @@ test02() VERIFY( entry1.path() == p/"x" ); VERIFY( iter == end(iter) ); + // Test post-increment (libstdc++/89986) + ec = bad_ec; + iter = fs::directory_iterator(p, ec); + VERIFY( !ec ); + VERIFY( iter != end(iter) ); + iter.increment(ec); + VERIFY( !ec ); + VERIFY( iter == end(iter) ); + remove_all(p, ec); }