diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index 5e04d74..d5ff46d 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -45,7 +45,11 @@ #endif static int const stackLimit_g = 1000; +#if __cplusplus >= 201103L +thread_local static int stackDepth_g = 0; // see readValue() +#else static int stackDepth_g = 0; // see readValue() +#endif namespace Json {