Skip to content

Conversation

@erikgrahn13
Copy link

In the current state of the main branch of NeuralAmpModelerCore you cannot compile it with C++20 on MacOS. With MSVC it seems to still compile with C++20 but using the XCode toolchain it breaks due to the old version of nlohmann json

@sdatkinson
Copy link
Owner

Looking at the nlohmann/json releases page, I assume that "latest" means 3.11.3.

diffing your PR against that versions's single_include/nlohmann/json.hpp produces:

5700,5701c5700
<     static constexpr value_t integral_value_t = std::is_unsigned<underlying_type>::value ? value_t::number_unsigned : value_t::number_integer;
<     external_constructor<integral_value_t>::construct(j, static_cast<underlying_type>(e));
---
>     external_constructor<value_t::number_integer>::construct(j, static_cast<underlying_type>(e));
7274c7273
<     std::vector<bool> keep_stack {}; // NOLINT(readability-redundant-member-init)
---
>     std::vector<bool> keep_stack {};
7276c7275
<     std::vector<bool> key_keep_stack {}; // NOLINT(readability-redundant-member-init)
---
>     std::vector<bool> key_keep_stack {};
24153c24152
<                 const auto error_msg = (op == "op") ? "operation" : detail::concat("operation '", op, '\''); // NOLINT(bugprone-unused-local-non-trivial-variable)
---
>                 const auto error_msg = (op == "op") ? "operation" : detail::concat("operation '", op, '\'');

So this doesn't appear to actually be v3.11.3 (and it's not other versions because there would be diffs on the version stated in the comments.)

This is a good idea (thanks for the PR to bring it to my attention), but I might just try out 3.12.0 and use that if everything seems to work. (Feel free to update this PR to do that if you get to it before me. If not I'll note here and close this.)

But also, I'd prefer not to use the head of a dev branch, if that's what's going on here that explains the diff above, since that can make it difficult to track down issues if they arise).

@sdatkinson
Copy link
Owner

Superseded by #152. Thanks!

@sdatkinson sdatkinson closed this Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants