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.
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>;