Skip to content

Commit

Permalink
Add Default Member Initializer on value_storage_ as suggested by @t…
Browse files Browse the repository at this point in the history
…koeppe:

#4877 (comment)

This fixes the errors reported under commit f07b28b.
  • Loading branch information
Ralf W. Grosse-Kunstleve committed Oct 9, 2023
1 parent 7bc16a6 commit 78f4e93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/pybind11/numpy.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class LazyInitializeAtLeastOnceDestroyNever {
= default;

private:
alignas(T) char value_storage_[sizeof(T)];
alignas(T) char value_storage_[sizeof(T)] = {};
bool initialized_ = false;
};

Expand Down

0 comments on commit 78f4e93

Please sign in to comment.