mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-27 07:32:02 +00:00
Merge branch 'pybind:master' into master
This commit is contained in:
commit
f1f5efd658
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -712,7 +712,7 @@ jobs:
|
|||||||
|
|
||||||
include:
|
include:
|
||||||
- python: 3.9
|
- python: 3.9
|
||||||
args: -DCMAKE_CXX_STANDARD=20 -DDOWNLOAD_EIGEN=OFF
|
args: -DCMAKE_CXX_STANDARD=20
|
||||||
- python: 3.8
|
- python: 3.8
|
||||||
args: -DCMAKE_CXX_STANDARD=17
|
args: -DCMAKE_CXX_STANDARD=17
|
||||||
|
|
||||||
@ -835,7 +835,7 @@ jobs:
|
|||||||
cmake -S . -B build
|
cmake -S . -B build
|
||||||
-DPYBIND11_WERROR=ON
|
-DPYBIND11_WERROR=ON
|
||||||
-DDOWNLOAD_CATCH=ON
|
-DDOWNLOAD_CATCH=ON
|
||||||
-DDOWNLOAD_EIGEN=OFF
|
-DDOWNLOAD_EIGEN=ON
|
||||||
-DCMAKE_CXX_STANDARD=20
|
-DCMAKE_CXX_STANDARD=20
|
||||||
|
|
||||||
- name: Build C++20
|
- name: Build C++20
|
||||||
|
@ -822,7 +822,9 @@ struct is_template_base_of_impl {
|
|||||||
/// Check if a template is the base of a type. For example:
|
/// Check if a template is the base of a type. For example:
|
||||||
/// `is_template_base_of<Base, T>` is true if `struct T : Base<U> {}` where U can be anything
|
/// `is_template_base_of<Base, T>` is true if `struct T : Base<U> {}` where U can be anything
|
||||||
template <template <typename...> class Base, typename T>
|
template <template <typename...> class Base, typename T>
|
||||||
#if defined(PYBIND11_CPP20) || !defined(_MSC_VER) // Sadly, all MSVC versions incl. 2022 need this.
|
// Sadly, all MSVC versions incl. 2022 need the workaround, even in C++20 mode.
|
||||||
|
// See also: https://github.com/pybind/pybind11/pull/3741
|
||||||
|
#if !defined(_MSC_VER)
|
||||||
using is_template_base_of
|
using is_template_base_of
|
||||||
= decltype(is_template_base_of_impl<Base>::check((intrinsic_t<T> *) nullptr));
|
= decltype(is_template_base_of_impl<Base>::check((intrinsic_t<T> *) nullptr));
|
||||||
#else
|
#else
|
||||||
|
@ -21,10 +21,12 @@
|
|||||||
// make it version specific, or even remove it later, but considering that
|
// make it version specific, or even remove it later, but considering that
|
||||||
// 1. C4127 is generally far more distracting than useful for modern template code, and
|
// 1. C4127 is generally far more distracting than useful for modern template code, and
|
||||||
// 2. we definitely want to ignore any MSVC warnings originating from Eigen code,
|
// 2. we definitely want to ignore any MSVC warnings originating from Eigen code,
|
||||||
// it is probably best to keep this around indefinitely.
|
// it is probably best to keep this around indefinitely.
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
# pragma warning(push)
|
# pragma warning(push)
|
||||||
# pragma warning(disable : 4127) // C4127: conditional expression is constant
|
# pragma warning(disable : 4127) // C4127: conditional expression is constant
|
||||||
|
# pragma warning(disable : 5054) // https://github.com/pybind/pybind11/pull/3741
|
||||||
|
// C5054: operator '&': deprecated between enumerations of different types
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <Eigen/Core>
|
#include <Eigen/Core>
|
||||||
|
Loading…
Reference in New Issue
Block a user