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

Please include <climits> for CHAR_BIT #100

Closed
toge opened this issue Jan 5, 2023 · 1 comment
Closed

Please include <climits> for CHAR_BIT #100

toge opened this issue Jan 5, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@toge
Copy link
Contributor

toge commented Jan 5, 2023

glaze/api/hash.hpp uses CHAR_BIT.

   template <class T, T Value, size_t... Is>
   consteval auto make_array_impl(std::index_sequence<Is...>) {
      return std::array<char, sizeof(T)>{ static_cast<char>(((Value >> (CHAR_BIT * Is)) & 0xff))... };
   }

CHAR_BIT is defined in <climits>.
Before 0.2.4, it was included by fmtlib.
Because glaze doesn't require fmtlib since 0.2.4, there is no explicit place where includes <climits>.
This causes compilation error in several environments.

Could you include <climits>? (ex. glaze/api/hash.hpp)

@mwalcott3 mwalcott3 added the bug Something isn't working label Jan 5, 2023
mwalcott3 added a commit that referenced this issue Jan 5, 2023
@mwalcott3
Copy link
Collaborator

Done, thanks for pointing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants