From 5e3ffb70dd316c75d7c1d0ff9717e55030bf314e Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Wed, 19 Feb 2020 17:00:22 +0900 Subject: [PATCH] fix: check clang macro when checking gcc is used --- toml/comments.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toml/comments.hpp b/toml/comments.hpp index b2e4980..9cf1ad4 100644 --- a/toml/comments.hpp +++ b/toml/comments.hpp @@ -88,7 +88,7 @@ struct preserve_comments // `std::vector::iterator` instead of `std::vector::const_iterator`. // Because of the const-correctness, we cannot convert a `const_iterator` to // an `iterator`. It causes compilation error in GCC 4.8.5. -#if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) && !defined(__clang__) # if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) <= 40805 # define TOML11_WORKAROUND_GCC_4_8_X_STANDARD_LIBRARY_IMPLEMENTATION # endif