From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 4ABB23858C5F for ; Mon, 24 Jul 2023 20:15:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4ABB23858C5F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690229713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Q2NzHxiSTML2Gk5hATymYUHeNZd4xxJdVlgeaZ/ClHM=; b=LzBToxkhPSz08CFgsg/T7GVDdGeYIiCndCSxO+Dn/gR7rZ9PHk2Kh0hod7SWogucUrpU+l 8y4QEfWn79+MaNttygBTEtaj+qXqAdR4jdiwBIh1q2sk+9W1Un9FK0mI5OfFrQOMMBrJvb Rp6huthMV7HF/iP3l5e5aI3jnOjPM6Q= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-635-85kmBPyTOtGIBBVB7rQyMg-1; Mon, 24 Jul 2023 16:15:11 -0400 X-MC-Unique: 85kmBPyTOtGIBBVB7rQyMg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 47C9A1C02144; Mon, 24 Jul 2023 20:15:11 +0000 (UTC) Received: from localhost (unknown [10.42.28.150]) by smtp.corp.redhat.com (Postfix) with ESMTP id E9445F782D; Mon, 24 Jul 2023 20:15:10 +0000 (UTC) Date: Mon, 24 Jul 2023 21:15:12 +0100 From: Jonathan Wakely To: Deev Patel Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: [PATCH] libstdc++: Add missing constexpr specifier and function overloads Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 23/07/23 20:28 -0700, Deev Patel wrote: >Hi, > >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 libstd with clang 16 using >c++20. Adding the constexpr specifier resolves the issue. > >2023-07-23 Deev Patel > > * include/std/format: Add missing constexpr specifiers on function overloads Thanks for the patch, I'll test and push it. N.B. libstdc++ patches should be CC'd to the libstdc++ mailing list, or I won't see them (and rely on somebody bringing it to my attention). >--- > 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>;