From 0b5010242c16f2c1fd109a0bede9bcad2bb5bb84 Mon Sep 17 00:00:00 2001 From: riccardoori11 Date: Thu, 7 May 2026 20:28:45 +0200 Subject: [PATCH] docs: clarify value return type deduction (#5158) --- docs/mkdocs/docs/api/basic_json/value.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mkdocs/docs/api/basic_json/value.md b/docs/mkdocs/docs/api/basic_json/value.md index c9bca6be7..8b502c015 100644 --- a/docs/mkdocs/docs/api/basic_json/value.md +++ b/docs/mkdocs/docs/api/basic_json/value.md @@ -110,7 +110,7 @@ changes to any JSON value. The value function is a template, and the return type of the function is determined by the type of the provided default value unless otherwise specified. This can have unexpected effects. In the example below, we store a 64-bit unsigned integer. We get exactly that value when using [`operator[]`](operator[].md). However, when we call `value` - and provide `#!c 0` as default value, then `#!c -1` is returned. The occurs, because `#!c 0` has type `#!c int` + and provide `#!c 0` as default value, then `#!c -1` is returned. This occurs, because `#!c 0` has type `#!c int` which overflows when handling the value `#!c 18446744073709551615`. To address this issue, either provide a correctly typed default value or use the template parameter to specify the