We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 257af0e commit ca1e08dCopy full SHA for ca1e08d
include/pybind11/pybind11.h
@@ -162,11 +162,12 @@ class cpp_function : public function {
162
# pragma GCC diagnostic ignored "-Wstrict-aliasing"
163
#endif
164
// UB without std::launder, but without breaking ABI and/or
165
- // a significant refactoring it's "impossible" to solve'
+ // a significant refactoring it's "impossible" to solve.
166
if (!std::is_trivially_destructible<Func>::value)
167
rec->free_data = [](function_record *r) {
168
- auto cap = PYBIND11_STD_LAUNDER((capture *) &r->data);
169
- cap->~capture();
+ auto data = PYBIND11_STD_LAUNDER((capture *) &r->data);
+ (void) data;
170
+ data->~capture();
171
};
172
#if defined(__GNUG__) && !PYBIND11_HAS_STD_LAUNDER
173
# pragma GCC diagnostic pop
0 commit comments