]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Use consteval for _S_noexcept() helper functions
authorJonathan Wakely <jwakely@redhat.com>
Thu, 11 Sep 2025 08:55:12 +0000 (09:55 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 11 Sep 2025 13:38:59 +0000 (14:38 +0100)
commitd99c6786c3ea083cdc70fa012674db58cc91079f
treeb09616eabce40d04924f8681da1b9ac977331432
parentf463e6bd8e84f12bde60f3e24e2d30da7fcda419
libstdc++: Use consteval for _S_noexcept() helper functions

These _S_noexcept() functions are only used in noexcept-specifiers and
never need to be called at runtime. They can be immediate functions,
i.e. consteval.

libstdc++-v3/ChangeLog:

* include/bits/iterator_concepts.h (_IterMove::_S_noexcept)
(_IterSwap::_S_noexcept): Change constexpr to consteval.
* include/bits/ranges_base.h (_Begin::_S_noexcept)
(_End::_S_noexcept, _RBegin::_S_noexcept, _REnd::_S_noexcept)
(_Size::_S_noexcept, _Empty::_S_noexcept, _Data::_S_noexcept):
Likewise.
* include/std/concepts (_Swap::_S_noexcept): Likewise.

Reviewed-by: Tomasz KamiƄski <tkaminsk@redhat.com>
libstdc++-v3/include/bits/iterator_concepts.h
libstdc++-v3/include/bits/ranges_base.h
libstdc++-v3/include/std/concepts