mirror of
https://github.com/nlohmann/json.git
synced 2026-10-14 12:55:17 +00:00
Remove the conversion to bool from json_view
explicit operator bool meant "refers to a value", which silently differs from what a basic_json converts to. Use !v.is_discarded() instead. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -62,7 +62,6 @@ element access, iteration, `get<T>()`, JSON Pointer support, `dump()`, or compar
|
||||
- [**is_primitive**](is_primitive.md) - return whether the type is primitive
|
||||
- [**is_structured**](is_structured.md) - return whether the type is structured
|
||||
- [**is_discarded**](is_discarded.md) - return whether the view is invalid
|
||||
- [**operator bool**](operator_bool.md) - return whether the view refers to a value
|
||||
|
||||
### Capacity
|
||||
|
||||
|
||||
Reference in New Issue
Block a user