]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Remove noexcept from std::generator::promise_type::yield_value
authorJonathan Wakely <jwakely@redhat.com>
Thu, 1 Feb 2024 21:15:20 +0000 (21:15 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 2 Feb 2024 10:18:04 +0000 (10:18 +0000)
This overload of std::generator::promise_type::yield_value calls things
which might throw, so should not be noexcept. The noexcept was remove by
LWG 3894.

libstdc++-v3/ChangeLog:

* include/std/generator (promise_type::yield_value): Remove
noexcept from fourth overload, as per LWG 3894.

libstdc++-v3/include/std/generator

index e7ef5ddfdd342f5b25485c98ece022c75da5e445..87983ee5e7c649fc7c9ea85458f009ce207e949f 100644 (file)
@@ -155,7 +155,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        requires convertible_to<ranges::range_reference_t<_R>, _Yielded>
        auto
        yield_value(ranges::elements_of<_R, _Alloc> __r)
-         noexcept
        {
          auto __n = [] (allocator_arg_t, _Alloc,
                         ranges::iterator_t<_R> __i,