diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 97cc3bea8..a400bfdb0 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -697,7 +697,7 @@ template using remove_reference_t = typename std::remove_reference::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