From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 705263858C5F; Mon, 24 Jul 2023 21:12:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 705263858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690233133; bh=eFRtAQBHxApANNR8CPwXOwrODEmOLRWLUHX6ewjcras=; h=From:To:Subject:Date:From; b=ui5mffD/Ujm8sy1lpS7xojavrkJlkN5Y6mAoFIwd0y5nSFgxCoLN4Pc6P7mN2DF4+ U1SOdz6P2lb7b9eWnKr3opXpP0ly6+3W3TRbIpDDnwsmv4L6/PjJ4krL5RVNNrDd7W 3mV+DHhzoW+TuBuWp+HstaoIzotkIk1IsCzEDmiM= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-2755] libstdc++: Add missing constexpr specifiers in X-Act-Checkin: gcc X-Git-Author: Deev Patel X-Git-Refname: refs/heads/master X-Git-Oldrev: 2e31fe431b08b0302e1fa8a1c18ee51adafd41df X-Git-Newrev: 96482ffe60d9bdec802fcad705c69641b2a3e040 Message-Id: <20230724211213.705263858C5F@sourceware.org> Date: Mon, 24 Jul 2023 21:12:13 +0000 (GMT) List-Id: https://gcc.gnu.org/g:96482ffe60d9bdec802fcad705c69641b2a3e040 commit r14-2755-g96482ffe60d9bdec802fcad705c69641b2a3e040 Author: Deev Patel Date: Mon Jul 24 21:10:52 2023 +0100 libstdc++: Add missing constexpr specifiers in A couple of virtual functions in the libstdc++ format header are marked constexpr in the base class, but not in the derived class. This was causing build failures when trying to compile latest gcc libstdc++ with clang 16 using c++20. Adding the constexpr specifier resolves the issue. libstdc++-v3/ChangeLog: * include/std/format (_Formatting_scanner::_M_on_chars): Add missing constexpr specifier. (_Formatting_scanner::_M_format_arg): Likewise. Diff: --- libstdc++-v3/include/std/format | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format index 9710bff3c03..0c6069b2681 100644 --- a/libstdc++-v3/include/std/format +++ b/libstdc++-v3/include/std/format @@ -3554,14 +3554,14 @@ namespace __format using iterator = typename _Scanner<_CharT>::iterator; - void + constexpr void _M_on_chars(iterator __last) override { basic_string_view<_CharT> __str(this->begin(), __last); _M_fc.advance_to(__format::__write(_M_fc.out(), __str)); } - void + constexpr void _M_format_arg(size_t __id) override { using _Context = basic_format_context<_Out, _CharT>;