diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index 67397c4e..605acb36 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -775,7 +775,9 @@ template struct is_copy_constructible : std // so, copy constructability depends on whether the value_type is copy constructible. template struct is_copy_constructible, - std::is_same + std::is_same, + // Avoid infinite recursion + negation> >::value>> : is_copy_constructible {}; #if !defined(PYBIND11_CPP17)