-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Description
_HAS_CXX14 is never defined by MSVC
Proof:
https://gcc.godbolt.org/z/5odXyR
Also you may check that Microsoft STL uses only _HAS_CXX17
So second half of check for C++14 version support is incorrect (never triggered):
#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1)What it leads to - on older msvc's which was not defining __cplusplus properly (at least on msvc2015) C++14 is never treated as supported even though it is supported. Currently it only disables usage of transparent comparator.
Unfortunately it seems there is no correct way to check for C++14 support for msvc since lowest value of their language switch is also c++14 but more or less it was supported starting from VS2015 and since it is the lowest version library supports, maybe treating C++14 as always supported by msvc is the best option?