public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r13-7626] libstdc++: Add missing constexpr specifiers in <format>
Date: Fri, 28 Jul 2023 17:32:25 +0000 (GMT)	[thread overview]
Message-ID: <20230728173225.ECD583856261@sourceware.org> (raw)

https://gcc.gnu.org/g:52010f9449a7bf4f9d662e2708df301e85768a15

commit r13-7626-g52010f9449a7bf4f9d662e2708df301e85768a15
Author: Deev Patel <pateldeev@nevada.unr.edu>
Date:   Mon Jul 24 21:10:52 2023 +0100

    libstdc++: Add missing constexpr specifiers in <format>
    
    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.
    
    (cherry picked from commit 96482ffe60d9bdec802fcad705c69641b2a3e040)

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 9d5981e4882..9a3896b8339 100644
--- a/libstdc++-v3/include/std/format
+++ b/libstdc++-v3/include/std/format
@@ -3553,14 +3553,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>;

                 reply	other threads:[~2023-07-28 17:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230728173225.ECD583856261@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).