mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-28 18:51:30 +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;
|
using remove_reference_t = typename std::remove_reference<T>::type;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PYBIND11_CPP20)
|
#if defined(PYBIND11_CPP20) && defined(__cpp_lib_remove_cvref)
|
||||||
using std::remove_cvref;
|
using std::remove_cvref;
|
||||||
using std::remove_cvref_t;
|
using std::remove_cvref_t;
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user