Skip to content

Commit 78f4e93

Browse files
committed
Add Default Member Initializer on value_storage_ as suggested by @tkoeppe:
#4877 (comment) This fixes the errors reported under commit f07b28b.
1 parent 7bc16a6 commit 78f4e93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pybind11/numpy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class LazyInitializeAtLeastOnceDestroyNever {
8787
= default;
8888

8989
private:
90-
alignas(T) char value_storage_[sizeof(T)];
90+
alignas(T) char value_storage_[sizeof(T)] = {};
9191
bool initialized_ = false;
9292
};
9393

0 commit comments

Comments
 (0)