From 009ffc336299f58dcb439fae278eb135150b71c1 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 16 Feb 2022 07:07:53 -0800 Subject: [PATCH] MSVC C++20 test_eigen (#3741) * Removing C++20 condition for MSVC is_template_base_of decltype workaround. * `-DDOWNLOAD_EIGEN=ON` for MSVC 2022 C++20 * `-DDOWNLOAD_EIGEN=ON` for MSVC 2019 C++20 * `-DPYBIND11_WERROR=OFF` for MSVC C++20 (2019, 2020) * Restoring `defined(PYBIND11_CPP20)` in common.h * pragma warning(disable : 5054) in eigen.h * Reverting `-DPYBIND11_WERROR=OFF` changes. --- .github/workflows/ci.yml | 4 ++-- include/pybind11/detail/common.h | 4 +++- include/pybind11/eigen.h | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bf56c4e3..bc31281db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -712,7 +712,7 @@ jobs: include: - python: 3.9 - args: -DCMAKE_CXX_STANDARD=20 -DDOWNLOAD_EIGEN=OFF + args: -DCMAKE_CXX_STANDARD=20 - python: 3.8 args: -DCMAKE_CXX_STANDARD=17 @@ -835,7 +835,7 @@ jobs: cmake -S . -B build -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=OFF + -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=20 - name: Build C++20 diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 1070d686e..1d4939bed 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -822,7 +822,9 @@ struct is_template_base_of_impl { /// Check if a template is the base of a type. For example: /// `is_template_base_of` is true if `struct T : Base {}` where U can be anything template