public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2755] libstdc++: Add missing constexpr specifiers in <format>
@ 2023-07-24 21:12 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-07-24 21:12 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:96482ffe60d9bdec802fcad705c69641b2a3e040
commit r14-2755-g96482ffe60d9bdec802fcad705c69641b2a3e040
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.
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>;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-24 21:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-24 21:12 [gcc r14-2755] libstdc++: Add missing constexpr specifiers in <format> Jonathan Wakely
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).