mirror of
https://github.com/nlohmann/json.git
synced 2026-08-30 21:17:15 +00:00
opt_assign = j_null relies on basic_json's implicit conversion operator to satisfy std::optional's assignment operator template (which requires is_assignable, not just is_constructible). With implicit conversions disabled the operator is explicit, so the assignment doesn't compile at all rather than throwing at runtime. Fixes the ci_test_noimplicitconversions failure on #5269. Signed-off-by: Niels Lohmann <mail@nlohmann.me>