cfmt/StrFmt: support s128 formatting (untested)

This commit is contained in:
Nekotekina 2022-11-24 17:17:46 +03:00 committed by Ivan
parent 661be41c5a
commit bf388e5428
2 changed files with 36 additions and 22 deletions

View file

@ -449,7 +449,7 @@ struct fmt::cfmt_src
{
// Hack: use known function pointers to determine type
#define TYPE(type) \
if (sup[extra].fmt_string == &fmt_class_string<type>::format) return sizeof(type);
if (sup[extra].fmt_string == &fmt_class_string<type>::format) return sizeof(type);
TYPE(int);
TYPE(llong);
@ -457,10 +457,11 @@ struct fmt::cfmt_src
TYPE(short);
if (std::is_signed<char>::value) TYPE(char);
TYPE(long);
TYPE(u128);
TYPE(s128);
#undef TYPE
if (sup[extra].fmt_string == &fmt_class_string<u128>::format)
return -1;
return 0;
}