mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
46dbee7d42
Now that #851 has removed all multiple uses of a caster, it can just use the default-constructed value with needing a reset. This fixes two issues: 1. With std::experimental::optional (at least under GCC 5.4), the `= {}` would construct an instance of the optional type and then move-assign it, which fails if the value type isn't move-assignable. 2. With older versions of Boost, the `= {}` could fail because it is ambiguous, allowing construction of either `boost::none` or the value type. |
||
---|---|---|
.. | ||
pybind11 |