mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 22:52:01 +00:00
overload_cast MSVC 2015 fix
The current `py::overload_cast` is hitting some ICEs under both MSVC 2015 and clang 3.8 on debian with the rewritten test suites; adding an empty constexpr constructor to the `overload_cast_impl` class seems to avoid the ICE.
This commit is contained in:
parent
4b159230d9
commit
3ed62218a8
@ -799,6 +799,8 @@ struct nodelete { template <typename T> void operator()(T*) { } };
|
||||
NAMESPACE_BEGIN(detail)
|
||||
template <typename... Args>
|
||||
struct overload_cast_impl {
|
||||
constexpr overload_cast_impl() {} // MSVC 2015 needs this
|
||||
|
||||
template <typename Return>
|
||||
constexpr auto operator()(Return (*pf)(Args...)) const noexcept
|
||||
-> decltype(pf) { return pf; }
|
||||
|
Loading…
Reference in New Issue
Block a user