Closed kanstantsin-chernik closed 4 years ago
Problem:
di.hpp
__has_include
Solution:
Issue: # _has_include is supported since VS 2017 15.3. Version of VS is defined in _MSVC_VER while _MSVC_LANG defines c++ version. So it should either be #if !defined(_MSVC_VER) < 1911 or just simply #if !defined(__has_include)
_has_include
_MSVC_VER
_MSVC_LANG
#if !defined(_MSVC_VER) < 1911
#if !defined(__has_include)
https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=vs-2019#compiler-features https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019#microsoft-specific-predefined-macros
Reviewers: @krzysztof-jusiak
Nice catch :+1: Thank you, @kanstantsin-chernik.
Problem:
di.hpp
incorrectly redefines__has_include
Solution:
Issue: #
_has_include
is supported since VS 2017 15.3. Version of VS is defined in_MSVC_VER
while_MSVC_LANG
defines c++ version. So it should either be#if !defined(_MSVC_VER) < 1911
or just simply#if !defined(__has_include)
https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=vs-2019#compiler-features https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019#microsoft-specific-predefined-macros
Reviewers: @krzysztof-jusiak