Description I have a use-case where I iterate over collections in a generic manner (using templates). However, iteration over basic_json fails due to the statement: JSON_ASSERT(m_object != nullptr); Before ass
template get<ns::person>(); // that's it assert(p == p2); Basic usage To make this work with one of your types, you only need to provide two functions: using json = nlohmann::json; namespace ns { void to_json(json& j, const person& p) { j = json{{"name", p.name}, ...
From: Eric Botcazou <ebotca...@adacore.com> As written down in a comment, "There is a *huge* amount of code duplication" in the implementation of default initializaion for objects in the front-end, between the (static) declaration case and the dynamic allocation case. This change factor...
(std::is_default_constructible_v<S1> == true); static_assert(std::is_trivially_default_constructible_v<S1> == false); struct S2 { int n; S2() = default; // trivial and non-throwing }; static_assert(std::is_trivially_default_constructible_v<S2> == true); static_assert(std::is_...
🐛 Describe the bug Below is a minimal repro of an example where torch.compile uses different dtypes than eager for the computation, causing a type mismatch error: Expected query, key, and value to have the same dtype, but got query.dtype...