From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id 8FBD7388C02C; Wed, 22 Jul 2020 09:12:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FBD7388C02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595409166; bh=7guoBHE2Wyv1d8q0BggkRV1VeNj07FBPFY/ItBgUzBo=; h=From:To:Subject:Date:From; b=boa/PhBQBjXNZHyR1YZNL5r7+HJzHiOG/6vraRSCulWgwcn7CIAVyLfhAAFsoHW24 Ih7x6Y4J1/Zim2OXYq4So7vDftcuJ6/4XVzVZqAWhmEUbpzhxU0G68kgMWyVC0mYse TeqyZPq5LMn0441MZ2jsoHRte9F8Wam/pbAT59do= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] libstdc++, coroutine: Add missing constexpr markers. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/users/aoliva/heads/testme X-Git-Oldrev: e7f0873a9c4ebccd078fc5330866efe0cd4c1309 X-Git-Newrev: f1b6e46c417224887c2f21baa6d4c538a25fe9fb Message-Id: <20200722091246.8FBD7388C02C@sourceware.org> Date: Wed, 22 Jul 2020 09:12:46 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jul 2020 09:12:46 -0000 https://gcc.gnu.org/g:f1b6e46c417224887c2f21baa6d4c538a25fe9fb commit f1b6e46c417224887c2f21baa6d4c538a25fe9fb Author: Iain Sandoe Date: Sun Jul 12 20:16:21 2020 +0100 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. Diff: --- libstdc++-v3/include/std/coroutine | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/include/std/coroutine b/libstdc++-v3/include/std/coroutine index b40a3bcf9cc..468d1107557 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