mirror of
https://github.com/nlohmann/json.git
synced 2026-11-07 16:25:34 +00:00
* Tests: make sweep_allocator::construct() not viable for const types The newest libc++ (emsdk latest, used by ci_emscripten) probes construct(const T*, const T&) in an unevaluated context while checking whether copies are trivial. For the test allocator, instantiating the noexcept specification then fails to compile, because static_cast<void*> cannot drop the const qualifier. Constrain construct() to non-const types, which makes the probe fail in the SFINAE context instead of with a hard error. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N5NasEsrzHhSNouxSoEwqz Signed-off-by: Niels Lohmann <mail@nlohmann.me> * Fix CI: astyle and clang-tidy for sweep_allocator::construct() astyle 3.4.13 reformats the enable_if<!...> default template argument (Check amalgamation). Delete the const overload instead, which makes the libc++ probe for const objects fail in the SFINAE context just the same and needs no <type_traits>. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N5NasEsrzHhSNouxSoEwqz Signed-off-by: Niels Lohmann <mail@nlohmann.me> --------- Signed-off-by: Niels Lohmann <mail@nlohmann.me> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>