From 8d7b5b6a287b08af3a495c36ad97ce8a4a899930 Mon Sep 17 00:00:00 2001 From: Andrea Cocito <39852324+puffetto@users.noreply.github.com> Date: Mon, 7 Mar 2022 13:43:50 +0100 Subject: [PATCH] Add clarification to avoid misunderstanding that cause #3360 (#3378) * Update macros.md Typos, typos --- doc/mkdocs/docs/features/macros.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/mkdocs/docs/features/macros.md b/doc/mkdocs/docs/features/macros.md index 3d2203e72..cade9d5bc 100644 --- a/doc/mkdocs/docs/features/macros.md +++ b/doc/mkdocs/docs/features/macros.md @@ -51,6 +51,8 @@ that enabling this macro increases the size of every JSON value by one pointer a The diagnostics messages can also be controlled with the CMake option `JSON_Diagnostics` (`OFF` by default) which sets `JSON_DIAGNOSTICS` accordingly. +WARNING: As this macro changes the definition of the json object, it MUST be defined in the same way globally, even across different compilation units; do NOT link together code compiled with and without JSON_DIAGNOSTICS defined as this is a violation of the One Definition Rule and will cause undefined behaviour. + !!! info "Default behavior" ```cpp