Skip to content

Commit

Permalink
fixed FLT_RADIX check getting broken by MKL
Browse files Browse the repository at this point in the history
fixes #202
  • Loading branch information
marzer committed Sep 11, 2023
1 parent d46cac7 commit 42a428f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -30,7 +30,8 @@ template:
- fixed error in README (#195) (@andrewkcorcoran)
- fixed compiler error when using NVCC (#198) (@thompsonnoahe)
- fixed `noexcept(...)` sometimes being incorrectly derived on `for_each()`
- fixed `for_each()` compilation error on GCC <= 7 (#197) (@sagi-ottopia)
- fixed `for_each()` compilation error on GCC <= 7 (#197) (@sagi-ottopia, @damirbarr)
- fixed `FLT_RADIX` check getting broken by Intel MKL headers (#202) (@iago-lito)

#### Changes:

Expand Down
3 changes: 3 additions & 0 deletions include/toml++/impl/forward_declarations.hpp
Expand Up @@ -35,12 +35,15 @@ TOML_ENABLE_WARNINGS;
"Thanks!"

static_assert(CHAR_BIT == 8, TOML_ENV_MESSAGE);
#ifdef FLT_RADIX
static_assert(FLT_RADIX == 2, TOML_ENV_MESSAGE);
#endif
static_assert('A' == 65, TOML_ENV_MESSAGE);
static_assert(sizeof(double) == 8, TOML_ENV_MESSAGE);
static_assert(std::numeric_limits<double>::is_iec559, TOML_ENV_MESSAGE);
static_assert(std::numeric_limits<double>::digits == 53, TOML_ENV_MESSAGE);
static_assert(std::numeric_limits<double>::digits10 == 15, TOML_ENV_MESSAGE);
static_assert(std::numeric_limits<double>::radix == 2, TOML_ENV_MESSAGE);

#undef TOML_ENV_MESSAGE
#endif // !TOML_DISABLE_ENVIRONMENT_CHECKS
Expand Down
3 changes: 3 additions & 0 deletions toml.hpp
Expand Up @@ -1414,12 +1414,15 @@ TOML_PUSH_WARNINGS;
"Thanks!"

static_assert(CHAR_BIT == 8, TOML_ENV_MESSAGE);
#ifdef FLT_RADIX
static_assert(FLT_RADIX == 2, TOML_ENV_MESSAGE);
#endif
static_assert('A' == 65, TOML_ENV_MESSAGE);
static_assert(sizeof(double) == 8, TOML_ENV_MESSAGE);
static_assert(std::numeric_limits<double>::is_iec559, TOML_ENV_MESSAGE);
static_assert(std::numeric_limits<double>::digits == 53, TOML_ENV_MESSAGE);
static_assert(std::numeric_limits<double>::digits10 == 15, TOML_ENV_MESSAGE);
static_assert(std::numeric_limits<double>::radix == 2, TOML_ENV_MESSAGE);

#undef TOML_ENV_MESSAGE
#endif // !TOML_DISABLE_ENVIRONMENT_CHECKS
Expand Down

0 comments on commit 42a428f

Please sign in to comment.