From: Deev Patel Date: Mon, 24 Jul 2023 20:10:52 +0000 (+0100) Subject: libstdc++: Add missing constexpr specifiers in X-Git-Tag: basepoints/gcc-15~7384 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96482ffe60d9bdec802fcad705c69641b2a3e040;p=thirdparty%2Fgcc.git 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 --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format index 9710bff3c034..0c6069b26818 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>;