PR libstdc++/80448 remove noexcept from defaulted functions

Submitted by Jonathan Wakely on April 19, 2017, 11:03 a.m.

Details

Message ID 20170419110338.GA11065@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely April 19, 2017, 11:03 a.m.
Clang trunk won't compile <experimental/filesystem> due to a conflict
between a default member initializer and "foo() noexcept = default;"
so this simply removes the noexept. The defaulted constructors should
still be noexcept anyway, so there's no need to explicitly require it.

	PR libstdc++/80448
	* include/experimental/bits/fs_dir.h (directory_iterator)
	(recursive_directory_iterator): Remove noexcept from defaulted
	constructors.

Tested ppc64le-linux, committed to trunk.
commit 2a66f241c739fc2c3c93e82a30bee97823a8df63
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Apr 19 11:52:27 2017 +0100

    PR libstdc++/80448 remove noexcept from defaulted functions
    
    	PR libstdc++/80448
    	* include/experimental/bits/fs_dir.h (directory_iterator)
    	(recursive_directory_iterator): Remove noexcept from defaulted
    	constructors.

Patch hide | download patch | download mbox

diff --git a/libstdc++-v3/include/experimental/bits/fs_dir.h b/libstdc++-v3/include/experimental/bits/fs_dir.h
index 3bdf911..0efaf94 100644
--- a/libstdc++-v3/include/experimental/bits/fs_dir.h
+++ b/libstdc++-v3/include/experimental/bits/fs_dir.h
@@ -181,7 +181,7 @@  _GLIBCXX_BEGIN_NAMESPACE_CXX11
     typedef const directory_entry& reference;
     typedef input_iterator_tag     iterator_category;
 
-    directory_iterator() noexcept = default;
+    directory_iterator() = default;
 
     explicit
     directory_iterator(const path& __p)
@@ -262,7 +262,7 @@  _GLIBCXX_BEGIN_NAMESPACE_CXX11
     typedef const directory_entry& reference;
     typedef input_iterator_tag     iterator_category;
 
-    recursive_directory_iterator() noexcept = default;
+    recursive_directory_iterator() = default;
 
     explicit
     recursive_directory_iterator(const path& __p)
@@ -282,8 +282,7 @@  _GLIBCXX_BEGIN_NAMESPACE_CXX11
     recursive_directory_iterator(
         const recursive_directory_iterator&) = default;
 
-    recursive_directory_iterator(
-        recursive_directory_iterator&&) noexcept = default;
+    recursive_directory_iterator(recursive_directory_iterator&&) = default;
 
     ~recursive_directory_iterator();