You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! I'm currently working on integrating the wide-integer library into one of my projects. This library defines types that can portably represent signed and unsigned integers with widths larger than 64 bits.
My goal is to use these types together with my existing libfmt code, how would I go about defining a formatter that can handle these types in a similar fashion as the existing integer types? I'd like to mainly avoid having to manually implement all the different format specifiers manually since there are quite a few available for the built-in integer types. These types support all of the unary and binary operations a regular integer type would too so I'd assume that the existing number formatting algorithms would translate over just fine.
Thanks a lot
The text was updated successfully, but these errors were encountered:
Thank you! I tried implementing it using these functions but it ultimately fails because {fmt} tries to cast the value to a built-in integer in a few places. (e.g static_cast<detail::uint64_or_128_t<T>>(arg.abs_value)).
Would you be open to accept a PR that adds a way to do it properly? E.g maybe adding a type trait that can be specialized to allow custom types to be treated as built-in integers?
Hey! I'm currently working on integrating the wide-integer library into one of my projects. This library defines types that can portably represent signed and unsigned integers with widths larger than 64 bits.
My goal is to use these types together with my existing libfmt code, how would I go about defining a formatter that can handle these types in a similar fashion as the existing integer types? I'd like to mainly avoid having to manually implement all the different format specifiers manually since there are quite a few available for the built-in integer types. These types support all of the unary and binary operations a regular integer type would too so I'd assume that the existing number formatting algorithms would translate over just fine.
Thanks a lot
The text was updated successfully, but these errors were encountered: