From e41e278ab58b0e28fa78398c9c00c82cec123f4e Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Fri, 29 Jul 2022 08:05:35 +0200 Subject: [PATCH] :memo: note platform-dependent output on some examples --- docs/Makefile | 5 +++-- docs/mkdocs/docs/api/basic_json/basic_json.md | 2 ++ docs/mkdocs/docs/api/basic_json/max_size.md | 4 +++- docs/mkdocs/docs/api/basic_json/meta.md | 5 +++-- docs/mkdocs/docs/api/basic_json/std_hash.md | 2 ++ 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 0ce2c5e49..a751b0d2f 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -28,8 +28,9 @@ create_output: $(EXAMPLES:.cpp=.output) # check output of all stand-alone example files check_output: $(EXAMPLES:.cpp=.test) -# check output of all stand-alone example files (exclude meta which is dependent on the current compiler) -check_output_portable: $(filter-out examples/meta.test examples/max_size.test examples/std_hash.test,$(EXAMPLES:.cpp=.test)) +# check output of all stand-alone example files (exclude files with platform-dependent output.) +# This target is used in the CI (ci_test_documentation). +check_output_portable: $(filter-out examples/meta.test examples/max_size.test examples/std_hash.test exaples/basic_json__CompatibleType.test,$(EXAMPLES:.cpp=.test)) clean: rm -fr $(EXAMPLES:.cpp=) diff --git a/docs/mkdocs/docs/api/basic_json/basic_json.md b/docs/mkdocs/docs/api/basic_json/basic_json.md index 365cd7c22..e2e73612c 100644 --- a/docs/mkdocs/docs/api/basic_json/basic_json.md +++ b/docs/mkdocs/docs/api/basic_json/basic_json.md @@ -317,6 +317,8 @@ basic_json(basic_json&& other) noexcept; --8<-- "examples/basic_json__CompatibleType.output" ``` + Note the output is platform-dependent. + ??? example "Example: (5) create a container (array or object) from an initializer list" The example below shows how JSON values are created from initializer lists. diff --git a/docs/mkdocs/docs/api/basic_json/max_size.md b/docs/mkdocs/docs/api/basic_json/max_size.md index 31339dbe9..4c0c57520 100644 --- a/docs/mkdocs/docs/api/basic_json/max_size.md +++ b/docs/mkdocs/docs/api/basic_json/max_size.md @@ -40,7 +40,7 @@ string elements the JSON value can store which is `1`. ??? example - The following code calls `max_size()` on the different value types. Note the output is implementation specific. + The following code calls `max_size()` on the different value types. ```cpp --8<-- "examples/max_size.cpp" @@ -52,6 +52,8 @@ string elements the JSON value can store which is `1`. --8<-- "examples/max_size.output" ``` + Note the output is platform-dependent. + ## Version history - Added in version 1.0.0. diff --git a/docs/mkdocs/docs/api/basic_json/meta.md b/docs/mkdocs/docs/api/basic_json/meta.md index 87767e4d5..34d35ba8e 100644 --- a/docs/mkdocs/docs/api/basic_json/meta.md +++ b/docs/mkdocs/docs/api/basic_json/meta.md @@ -32,8 +32,7 @@ Constant. ??? example - The following code shows an example output of the `meta()` - function. + The following code shows an example output of the `meta()` function. ```cpp --8<-- "examples/meta.cpp" @@ -45,6 +44,8 @@ Constant. --8<-- "examples/meta.output" ``` + Note the output is platform-dependent. + ## See also - [**NLOHMANN_JSON_VERSION_MAJOR**/**NLOHMANN_JSON_VERSION_MINOR**/**NLOHMANN_JSON_VERSION_PATCH**](../macros/nlohmann_json_version_major.md) - library version information diff --git a/docs/mkdocs/docs/api/basic_json/std_hash.md b/docs/mkdocs/docs/api/basic_json/std_hash.md index b66515d5a..b9de74f8c 100644 --- a/docs/mkdocs/docs/api/basic_json/std_hash.md +++ b/docs/mkdocs/docs/api/basic_json/std_hash.md @@ -26,6 +26,8 @@ type of the JSON value is taken into account to have different hash values for ` --8<-- "examples/std_hash.output" ``` + Note the output is platform-dependent. + ## Version history - Added in version 1.0.0.