-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Qualify detail::forward_like
to avoid conflict with C++23
#4136
Conversation
C++23 feature: P2445R1 forward_like()
Hi Stephan, could you please post a copy of an error message here? For future reference, also for people who debug via "google the error message" (like myself). |
@rwgk Sure! Here's the exact error message:
(Please ignore how the MSVC paths mention VS 2019; this is an artifact of how our test team runs development builds of the compiler+STL with open-source projects.) |
@StephanTLavavej Question, does the new std::forward_like have identical behavior to detail::forward_like? If so, we may want to add a ifdef that just aliases it instead of reimplementing (like we do for various other backported std functions like enable_if_t etc... in detail/common.h). |
@Skylion007 They don't appear to be identical. pybind11/include/pybind11/stl.h Lines 40 to 50 in 68e6fda
|
Qualify
detail::forward_like
to avoid conflict with C++23's feature P2445R1std::forward_like
.Description
C++23 has added a feature P2445R1
std::forward_like
, and MSVC's STL has implemented it by merging microsoft/STL#2974 (which will be available in VS 2022 17.4 Preview 3). When building pybind11 with the updated STL in/std:c++latest
mode, there are compiler errors because pybind11 has its ownforward_like
in adetail
namespace. Qualifying the callsites is necessary to avoid ambiguity.Suggested changelog entry: