From 1feb430faaac6bd8094e996861d6025f9903d34e Mon Sep 17 00:00:00 2001 From: VinaCC Date: Mon, 5 Sep 2022 20:50:06 +0200 Subject: [PATCH] Fix intellisense on Windows (#3082) __INTELLISENSE__ is 1 on vs2022 and clang, causing FMT_HAS_INCLUDE, FMT_USE_FCNTL, etc to be 0. That results in VS and VSCode having a lot of linter errors while code compiles just fine. --- include/fmt/core.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index bc87b2f5..42835c0e 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -69,9 +69,7 @@ # define FMT_HAS_FEATURE(x) 0 #endif -#if (defined(__has_include) || FMT_ICC_VERSION >= 1600 || \ - FMT_MSC_VERSION > 1900) && \ - !defined(__INTELLISENSE__) +#if defined(__has_include) || FMT_ICC_VERSION >= 1600 || FMT_MSC_VERSION > 1900 # define FMT_HAS_INCLUDE(x) __has_include(x) #else # define FMT_HAS_INCLUDE(x) 0