Skip to content

Commit

Permalink
Adopt suggestion by @tkoeppe:
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralf W. Grosse-Kunstleve committed Oct 9, 2023
1 parent 1ce2715 commit e7be9c2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/pybind11/numpy.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ class LazyInitializeAtLeastOnceDestroyNever {
PYBIND11_WARNING_POP
}

constexpr LazyInitializeAtLeastOnceDestroyNever() = default;
#if __cplusplus >= 202002L
constexpr
#endif // C++20
~LazyInitializeAtLeastOnceDestroyNever()
= default;

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

0 comments on commit e7be9c2

Please sign in to comment.