diff options
author | Deev Patel <pateldeev@nevada.unr.edu> | 2023-07-24 21:10:52 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-07-24 22:12:02 +0100 |
commit | 96482ffe60d9bdec802fcad705c69641b2a3e040 (patch) | |
tree | 6efec33d2b7d18c536fa0edeebd300e4203c8ff7 | |
parent | 2e31fe431b08b0302e1fa8a1c18ee51adafd41df (diff) | |
download | gcc-96482ffe60d9bdec802fcad705c69641b2a3e040.zip gcc-96482ffe60d9bdec802fcad705c69641b2a3e040.tar.gz gcc-96482ffe60d9bdec802fcad705c69641b2a3e040.tar.bz2 |
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.
-rw-r--r-- | libstdc++-v3/include/std/format | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format index 9710bff..0c6069b 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>; |