diff mbox series

[committed] libstdc++: Add noexcept to std::nullopt_t constructor

Message ID YUPAUvKR9etbzi/9@redhat.com
State New
Headers show
Series [committed] libstdc++: Add noexcept to std::nullopt_t constructor | expand

Commit Message

Jonathan Wakely Sept. 16, 2021, 10:08 p.m. UTC
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/std/optional (nullptr_t): Make constructor noexcept.

Tested x86_64-linux. Committed to trunk.
commit cbe705a2f749c98a5f803afeb207e175b4c9a3c3
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Sep 16 14:14:38 2021

    libstdc++: Add noexcept to std::nullopt_t constructor
    
    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
    
    libstdc++-v3/ChangeLog:
    
            * include/std/optional (nullptr_t): Make constructor noexcept.
diff mbox series

Patch

diff --git a/libstdc++-v3/include/std/optional b/libstdc++-v3/include/std/optional
index b8ab7510757..b6ebe12b3e1 100644
--- a/libstdc++-v3/include/std/optional
+++ b/libstdc++-v3/include/std/optional
@@ -70,7 +70,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     enum class _Construct { _Token };
 
     // Must be constexpr for nullopt_t to be literal.
-    explicit constexpr nullopt_t(_Construct) { }
+    explicit constexpr nullopt_t(_Construct) noexcept { }
   };
 
   /// Tag to disengage optional objects.