Fix issue reference in std::optional test comment

Update the comment in the null section test to reference #5246 instead of
placeholder #XXXX, clarifying where the direct-init/copy-init limitation is tracked.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-07-08 15:14:59 +02:00
parent 2f383b80ee
commit acca7575ce
+1 -1
View File
@@ -1778,7 +1778,7 @@ TEST_CASE("std::optional")
// constructible from T, and T is constructible from basic_json via the
// operator); there is no SFINAE path that distinguishes "call from inside
// std::optional's constructor" from "direct call". Use get<std::optional<T>>()
// or get_to() instead for correct null handling. See json#4864 and #XXXX.
// or get_to() instead for correct null handling. See #4864 and #5246.
CHECK_THROWS_AS(std::optional<std::string>(j_null), json::type_error);
CHECK_THROWS_AS(std::optional<int>(j_null), json::type_error);
}