boost-ext / di

C++14 Dependency Injection Library
https://boost-ext.github.io/di
1.16k stars 140 forks source link

Fix __has_include #456

Closed kanstantsin-chernik closed 4 years ago

kanstantsin-chernik commented 4 years ago

Problem:

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

krzysztof-jusiak commented 4 years ago

Nice catch :+1: Thank you, @kanstantsin-chernik.