-
Notifications
You must be signed in to change notification settings - Fork 2.2k
std::negation requires Visual Studio 2015 Update 3 #706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think that we generally require that compiler because earlier versions may ICE when compiling pybind11 code. |
OK, it was just a FYI as I have a build machine that complained about this on the update to Pybind11 2.0.0. In other places of the code base, you check for the specific msvc version. |
We should probably put a cmake fatal error for unsupported compilers. (MSVC before 2015u3, GCC before 4.8, etc.) |
VS 2015 Update 2 should be able to compile pybind11 with just some minor workarounds, but I think the bigger issue is that it's difficult to test. AFAIK AppVeyor only has a "Visual Studio 2015" option and it's always kept up to date, so there's only Update 3 to test against.
Making the compiler support explicit sounds good, but I think CMake skimps on the minor version numbers. Perhaps doing the check in |
Somewhat related: the latest MSVC 2017 RC also ICEs when building pybind as well. What a wonderful compiler. Edit: this is caused by the |
Another problem with std::negation is that it was introduced in C++17 while pybind11 advertises C++11 compat... |
It's only used (along with std::conjunction and std::disjunction) on MSVC, because MSVC has it in the stl (as of 2015u3), and has trouble with some of the template metaprogramming in common.h. Edit: this is the part that doesn't work on MSVC. But if you look at the surrounding code, you can see we have various differences based on whether under a C++14, C++11, or C++17 compiler, plus special MSVC handling to avoid compiler bugs. |
@jagerman when my compiler (clang on macOS ) is in -std=c++1z mode, it seems that it goes through the |
As reported here.
The text was updated successfully, but these errors were encountered: