Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when formatting _BitInt #4007

Closed
canhld94 opened this issue Jun 10, 2024 · 2 comments
Closed

Error when formatting _BitInt #4007

canhld94 opened this issue Jun 10, 2024 · 2 comments

Comments

@canhld94
Copy link

It's good in version 9.1.0 (https://godbolt.org/z/e5rzjxbEb), but starts failing since v10 (https://godbolt.org/z/fEdsc75rb):

/opt/compiler-explorer/libs/fmt/10.2.1/include/fmt/core.h:1828:39: error: constexpr variable 'desc' must be initialized by a constant expression
 1828 |   static constexpr unsigned long long desc =
      |                                       ^
 1829 |       (is_packed ? detail::encode_types<Context, Args...>()
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1830 |                  : detail::is_unpacked_bit | num_args) |
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1831 |       (num_named_args != 0
      |       ~~~~~~~~~~~~~~~~~~~~
 1832 |            ? static_cast<unsigned long long>(detail::has_named_args_bit)
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1833 |            : 0);
@vitaut vitaut changed the title Error when formatting _BigInt Error when formatting _BitInt Jun 10, 2024
@vitaut
Copy link
Contributor

vitaut commented Jun 10, 2024

I was not aware of _BitInt working in version 9, it was entirely accidental. We should make it work intentionally and add a test case.

Arghnews added a commit to Arghnews/fmt that referenced this issue Jul 13, 2024
Arghnews added a commit to Arghnews/fmt that referenced this issue Jul 13, 2024
Arghnews added a commit to Arghnews/fmt that referenced this issue Jul 13, 2024
Arghnews added a commit to Arghnews/fmt that referenced this issue Jul 13, 2024
Arghnews added a commit to Arghnews/fmt that referenced this issue Jul 13, 2024
Arghnews added a commit to Arghnews/fmt that referenced this issue Aug 26, 2024
Issue fmtlib#4007
Make _BitInt up to 128bits formattable
Note, libstdc++ is_signed doesn't work with _BitInt (so use own)
Arghnews added a commit to Arghnews/fmt that referenced this issue Aug 26, 2024
Issue fmtlib#4007
Make _BitInt up to 128bits formattable
Note, libstdc++ is_signed doesn't work with _BitInt (so use own)
Arghnews added a commit to Arghnews/fmt that referenced this issue Aug 28, 2024
Issue fmtlib#4007
Make _BitInt up to 128bits formattable
Note, libstdc++ is_signed doesn't work with _BitInt (so use own)
Arghnews added a commit to Arghnews/fmt that referenced this issue Aug 28, 2024
Issue fmtlib#4007
Make _BitInt up to 128bits formattable
Note, libstdc++ is_signed doesn't work with _BitInt (so use own)
Arghnews added a commit to Arghnews/fmt that referenced this issue Aug 29, 2024
Issue fmtlib#4007
Make _BitInt up to 128bits formattable
Note, libstdc++ is_signed doesn't work with _BitInt (so use own)
vitaut pushed a commit that referenced this issue Aug 29, 2024
Issue #4007
Make _BitInt up to 128bits formattable
Note, libstdc++ is_signed doesn't work with _BitInt (so use own)
@vitaut
Copy link
Contributor

vitaut commented Aug 29, 2024

_BitInt support has been added by @Arghnews (thanks!) in #4072.

@vitaut vitaut closed this as completed Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants