diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-07-12 20:16:21 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2020-07-17 19:51:09 +0100 |
commit | f1b6e46c417224887c2f21baa6d4c538a25fe9fb (patch) | |
tree | f8a18096eff45460a0420cdd52fcafaac8762576 | |
parent | e7f0873a9c4ebccd078fc5330866efe0cd4c1309 (diff) | |
download | gcc-f1b6e46c417224887c2f21baa6d4c538a25fe9fb.zip gcc-f1b6e46c417224887c2f21baa6d4c538a25fe9fb.tar.gz gcc-f1b6e46c417224887c2f21baa6d4c538a25fe9fb.tar.bz2 |
libstdc++, coroutine: Add missing constexpr markers.
The methods of the trivial awaitables are intended to
be constexpr.
libstdc++-v3/ChangeLog:
* include/std/coroutine: Mark the methods of the
trivial awaitables as constexpr.
-rw-r--r-- | libstdc++-v3/include/std/coroutine | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libstdc++-v3/include/std/coroutine b/libstdc++-v3/include/std/coroutine index b40a3bc..468d110 100644 --- a/libstdc++-v3/include/std/coroutine +++ b/libstdc++-v3/include/std/coroutine @@ -273,20 +273,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// [coroutine.trivial.awaitables] struct suspend_always { - bool await_ready() { return false; } + constexpr bool await_ready() const noexcept { return false; } - void await_suspend(coroutine_handle<>) {} + constexpr void await_suspend(coroutine_handle<>) const noexcept {} - void await_resume() {} + constexpr void await_resume() const noexcept {} }; struct suspend_never { - bool await_ready() { return true; } + constexpr bool await_ready() const noexcept { return true; } - void await_suspend(coroutine_handle<>) {} + constexpr void await_suspend(coroutine_handle<>) const noexcept {} - void await_resume() {} + constexpr void await_resume() const noexcept {} }; } // namespace __n4861 |