Код: Выделить всё
error C2338: static_assert failed: 'The format() member function can't be called on const formatter. To make the formatter usable, add const to format().
Код: Выделить всё
_NODISCARD auto make_format_args(_Args&... _Vals) {
if constexpr ((_Formattable_with_non_const && ...)) {
**static_assert((_Formattable_with && ...),**
"The format() member function can't be called on const formatter. "
"To make the formatter usable, add const to format(). "
"See N4971 [format.arg.store]/2 and [formatter.requirements].");
} else {
static_assert((_Formattable_with && ...),
"Cannot format an argument. To make T formattable, provide a formatter specialization. "
"See N4971 [format.arg.store]/2 and [formatter.requirements].");
}
return _Format_arg_store{_Vals...};
}
Как понять и исправить ошибку?
Подробнее здесь: https://stackoverflow.com/questions/793 ... ource-code