From 735a20e36da653699ac7b66c5e901c6e7a1a6c8b Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 13 Oct 2026 18:57:59 +0200 Subject: [PATCH] Use json::with_integers_t in the test and the docs Signed-off-by: Niels Lohmann --- docs/mkdocs/docs/features/types/template_parameters.md | 4 ++-- tests/src/unit-same-number-types.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/mkdocs/docs/features/types/template_parameters.md b/docs/mkdocs/docs/features/types/template_parameters.md index c57bb314f..fe8b7495b 100644 --- a/docs/mkdocs/docs/features/types/template_parameters.md +++ b/docs/mkdocs/docs/features/types/template_parameters.md @@ -521,8 +521,8 @@ therefore silently changes parse results rather than raising an error. See #### Same type for both `NumberUnsignedType` may be the same type as `NumberIntegerType`, e.g. -`#!cpp basic_json`, for code that only -wants to handle one integer type. Such a `basic_json` stores every integer as +`#!cpp nlohmann::json::with_integers_t` (see +[`with_integers_t`](../../api/basic_json/with_t.md)), for code that only wants to handle one integer type. Such a `basic_json` stores every integer as [`number_integer_t`](../../api/basic_json/number_integer_t.md): - [`is_number_unsigned()`](../../api/basic_json/is_number_unsigned.md) is always `#!cpp false`, and diff --git a/tests/src/unit-same-number-types.cpp b/tests/src/unit-same-number-types.cpp index f2c501294..ba42710c1 100644 --- a/tests/src/unit-same-number-types.cpp +++ b/tests/src/unit-same-number-types.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -24,7 +23,7 @@ namespace { template -using same_types_json = nlohmann::basic_json; +using same_types_json = nlohmann::json::with_integers_t; using json64 = same_types_json; using json32 = same_types_json;