PR libstdc++/89986 export directory_iterator::increment
authorJonathan Wakely <jwakely@redhat.com>
Fri, 5 Apr 2019 16:56:27 +0000 (17:56 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 5 Apr 2019 16:56:27 +0000 (17:56 +0100)
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

libstdc++-v3/ChangeLog
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/testsuite/27_io/filesystem/iterators/directory_iterator.cc

index e2aa3962f280a34d242f7ce0b70a228755f3f22e..655c3d073a209e5b3c340910e5b9a9f3ccab7370 100644 (file)
@@ -1,5 +1,10 @@
 2019-04-05  Jonathan Wakely  <jwakely@redhat.com>
 
+       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())
index 019b581df711afafeb435aea941ced60a250c83d..e8cf6f0a4a9d272083a323b26f6222b4d0ef2407 100644 (file)
@@ -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;
index 5288bd297bd08d88a6ff3c4e9602a685cf499c0b..492727c75b270084e1ce6f58f887f21bcd058e0a 100644 (file)
@@ -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);
 }