Skip to content

Commit

Permalink
Fix intellisense on Windows (#3082)
Browse files Browse the repository at this point in the history
__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.
  • Loading branch information
enginelesscc authored Sep 5, 2022
1 parent b98ffb7 commit 1feb430
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1feb430

Please sign in to comment.