Skip to content

Commit 9379b39

Browse files
authored
fix: MSVC 2017 C++17 on Python 3 regression (#3407)
* fix: MSVC 2017 C++17 on Python 3 regression * ci: add 3.7 job on CI
1 parent 78ee782 commit 9379b39

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,10 @@ jobs:
851851
std: 17
852852
args: >
853853
-DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR"
854+
- python: 3.7
855+
std: 17
856+
args: >
857+
-DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR"
854858
855859
steps:
856860
- uses: actions/checkout@v2

include/pybind11/functional.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ struct type_caster<std::function<Return(Args...)>> {
6969
// ensure GIL is held during functor destruction
7070
struct func_handle {
7171
function f;
72-
#if !(defined(_MSC_VER) && _MSC_VER == 1916 && defined(PYBIND11_CPP17) && PY_MAJOR_VERSION < 3)
72+
#if !(defined(_MSC_VER) && _MSC_VER == 1916 && defined(PYBIND11_CPP17))
7373
// This triggers a syntax error under very special conditions (very weird indeed).
7474
explicit
7575
#endif

0 commit comments

Comments
 (0)