mirror of
https://github.com/nlohmann/json.git
synced 2026-07-09 03:55:09 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user