mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Check for __cpp_lib_remove_cvref as well (#5761)
C++20 can be enabled while the C++ runtime is still much older so use the feature macro to check for it. For example, we are using the latest clang with c++23 on SLES, while the gcc version is 7.
This commit is contained in:
@@ -697,7 +697,7 @@ template <typename T>
|
||||
using remove_reference_t = typename std::remove_reference<T>::type;
|
||||
#endif
|
||||
|
||||
#if defined(PYBIND11_CPP20)
|
||||
#if defined(PYBIND11_CPP20) && defined(__cpp_lib_remove_cvref)
|
||||
using std::remove_cvref;
|
||||
using std::remove_cvref_t;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user