Skip to content

MSVC C++20 test_eigen - #3741

Merged
rwgk merged 7 commits into
pybind:masterfrom
rwgk:msvc2022_eigen
Feb 16, 2022
Merged

MSVC C++20 test_eigen#3741
rwgk merged 7 commits into
pybind:masterfrom
rwgk:msvc2022_eigen

Conversation

@rwgk

@rwgkrwgk commented Feb 15, 2022

Copy link
Copy Markdown
Collaborator

Description

This PR enables test_eigen for MSVC 2019 & 2022 C++20.

With the combination of

  • re-enabling the age-old MSVC workaround even for MSVC C++20 (533e5ad)
  • adding a warning suppression to eigen.h (cbb29c0)

test_eigen runs successfully with MSVC 2019 & 2022 C++20.

See also: #3722 (comment) (the entire discussion thread there)

Suggested changelog entry:

Testing eigen.h is now also enabled for MSVC 2019 & 2022 in C++20 mode.

@rwgk

rwgk commented Feb 15, 2022

Copy link
Copy Markdown
CollaboratorAuthor

Before 533e5ad all tests passed (warnings ignored). After the commit this error is generated (copied from MSVC 2022 C++20 log):

D:\a\pybind11\pybind11\include\pybind11\cast.h(1014,1): error C2752: 'pybind11::detail::type_caster<Eigen::Ref<Eigen::Matrix<double,-1,-1,0,-1,-1>,0,Eigen::OuterStride<-1>>,void>': more than one partial specialization matches the template argument list [D:\a\pybind11\pybind11\build\tests\pybind11_tests.vcxproj]

@rwgkrwgk changed the title MSVC C++20 eigenMSVC C++20 test_eigenFeb 16, 2022
@rwgk
rwgk marked this pull request as ready for review February 16, 2022 00:58
@rwgk
rwgk requested a review from henryiii as a code ownerFebruary 16, 2022 00:58
@rwgk
rwgk requested a review from Skylion007February 16, 2022 00:58
@rwgk
rwgk merged commit 009ffc3 into pybind:masterFeb 16, 2022
@rwgk
rwgk deleted the msvc2022_eigen branch February 16, 2022 15:07
@github-actionsgithub-actionsBot added the needs changelog Possibly needs a changelog entry label Feb 16, 2022
@henryiiihenryiii removed the needs changelog Possibly needs a changelog entry label Mar 29, 2022
@rwgkrwgk mentioned this pull request Feb 10, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@rwgk@henryiii