We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If a type is defined with NLOHMANN_DEFINE_TYPE_INTRUSIVE, it cannot directly be used with ordered_json.
NLOHMANN_DEFINE_TYPE_INTRUSIVE
ordered_json
#include <nlohmann/json.hpp> struct my_type_t { std::string key; NLOHMANN_DEFINE_TYPE_INTRUSIVE(my_type_t, key) }; int main() { auto thing = my_type_t{}; nlohmann::json my_json = thing; // doesn't compile nlohmann::ordered_json my_ordered_json = thing; return 0; }
I would expect nlohmann::ordered_json my_ordered_json = custom_type; to compile
nlohmann::ordered_json my_ordered_json = custom_type
No response
gcc 13.1
trunk on godbolt
develop
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
If a type is defined with
NLOHMANN_DEFINE_TYPE_INTRUSIVE
, it cannot directly be used withordered_json
.Reproduction steps
Expected vs. actual results
I would expect
nlohmann::ordered_json my_ordered_json = custom_type
; to compileMinimal code example
No response
Error messages
No response
Compiler and operating system
gcc 13.1
Library version
trunk on godbolt
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: