From 7e9028217516fd7cd41f0ad26fd4c2f4b55ad639 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Mon, 10 May 2021 23:00:30 +0900 Subject: [PATCH] fix: add region where -Wshadow is ignored on GCC 4 --- toml/types.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toml/types.hpp b/toml/types.hpp index a292d09..7bf4b2e 100644 --- a/toml/types.hpp +++ b/toml/types.hpp @@ -21,6 +21,11 @@ class basic_value; using character = char; using key = std::string; +#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ <= 4 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wshadow" +#endif + using boolean = bool; using integer = std::int64_t; using floating = double; // "float" is a keyward, cannot use it here. @@ -32,6 +37,10 @@ using floating = double; // "float" is a keyward, cannot use it here. // - local_date // - local_time +#if defined(__GNUC__) && !defined(__clang__) +# pragma GCC diagnostic pop +#endif + // default toml::value and default array/table. these are defined after defining // basic_value itself. // using value = basic_value;