Clarify that calling non-const format is deprecated

This commit is contained in:
Victor Zverovich 2023-11-24 10:21:57 -08:00
parent ffa5b14fe3
commit 06f1c0d725

View File

@ -1318,6 +1318,7 @@ template <typename Context> class value {
parse_ctx.advance_to(f.parse(parse_ctx));
using qualified_type =
conditional_t<has_const_formatter<T, Context>(), const T, T>;
// Calling format through a mutable reference is deprecated.
ctx.advance_to(f.format(*static_cast<qualified_type*>(arg), ctx));
}
};