libstdc++: Make coroutine_handle<_Promise>::from_address() noexcept [PR 99021]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 9 Feb 2021 11:23:29 +0000 (11:23 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 9 Feb 2021 12:31:52 +0000 (12:31 +0000)
The coroutine_handle<void>::from_address(void*) version is already
noexcept, and they do the same thing. Make them consistent.

libstdc++-v3/ChangeLog:

PR libstdc++/99021
* include/std/coroutine (coroutine_handle<P>::from_address): Add
noexcept.

libstdc++-v3/include/std/coroutine

index e69024caf4c6ce0b751bfca9237dca66b4b0b33c..209deb7bb42c02ab614a9c6a85c7b3b93f3a028f 100644 (file)
@@ -206,7 +206,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       constexpr void* address() const noexcept { return _M_fr_ptr; }
 
-      constexpr static coroutine_handle from_address(void* __a)
+      constexpr static coroutine_handle from_address(void* __a) noexcept
       {
        coroutine_handle __self;
        __self._M_fr_ptr = __a;