mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 06:35:12 +00:00
fix: Windows compiler, missing object initializer (#4188)
* Fix for windows compiler, missing object initializer * Removal of if-else macro for MSVC
This commit is contained in:
parent
d02f219fb9
commit
424ac4fe1b
@ -1033,12 +1033,7 @@ PYBIND11_NAMESPACE_END(detail)
|
||||
/// - regular: static_cast<Return (Class::*)(Arg0, Arg1, Arg2)>(&Class::func)
|
||||
/// - sweet: overload_cast<Arg0, Arg1, Arg2>(&Class::func)
|
||||
template <typename... Args>
|
||||
# if (defined(_MSC_VER) && _MSC_VER < 1920) /* MSVC 2017 */ \
|
||||
|| (defined(__clang__) && __clang_major__ == 5)
|
||||
static constexpr detail::overload_cast_impl<Args...> overload_cast = {};
|
||||
# else
|
||||
static constexpr detail::overload_cast_impl<Args...> overload_cast;
|
||||
# endif
|
||||
static constexpr detail::overload_cast_impl<Args...> overload_cast{};
|
||||
#endif
|
||||
|
||||
/// Const member function selector for overload_cast
|
||||
|
Loading…
Reference in New Issue
Block a user