From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2100) id 838B73861843; Tue, 18 Aug 2020 00:58:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 838B73861843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1597712324; bh=yBQ0wJIOj/HdE4MP9HgIwgg7zKhRLG7M7960s58Z3pI=; h=From:To:Subject:Date:From; b=Y8NZl3u8qoU1oj9BSkpZ9qfEcFjeDgz155EXDCbUDu9+QTQb6n7AK2hqOsz4GxBxG 9x2xs1GloecBDjfPqMAkSy6FPlyE8IbRWJkH7VaChZ8o46FtVQON13TQFh5fNu867I JvM3gZITQ0ScXByAslOYDjtJTk7kyohksOiAibCc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Giuliano Belinassi To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc(refs/users/giulianob/heads/autopar_rebase2)] libstdc++, coroutine: Add missing constexpr markers. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/users/giulianob/heads/autopar_rebase2 X-Git-Oldrev: ab1a1e6506f3ad9dd960146d1979efca6c647eed X-Git-Newrev: 1157829f23bf56bcd08761c0368de7343284431b Message-Id: <20200818005844.838B73861843@sourceware.org> Date: Tue, 18 Aug 2020 00:58:44 +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: Tue, 18 Aug 2020 00:58:44 -0000 https://gcc.gnu.org/g:1157829f23bf56bcd08761c0368de7343284431b commit 1157829f23bf56bcd08761c0368de7343284431b 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