diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 9e6947daa..6da7ef859 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -1033,12 +1033,7 @@ PYBIND11_NAMESPACE_END(detail) /// - regular: static_cast(&Class::func) /// - sweet: overload_cast(&Class::func) template -# if (defined(_MSC_VER) && _MSC_VER < 1920) /* MSVC 2017 */ \ - || (defined(__clang__) && __clang_major__ == 5) -static constexpr detail::overload_cast_impl overload_cast = {}; -# else -static constexpr detail::overload_cast_impl overload_cast; -# endif +static constexpr detail::overload_cast_impl overload_cast{}; #endif /// Const member function selector for overload_cast