File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -43,14 +43,6 @@ class array; // Forward declaration
4343
4444PYBIND11_NAMESPACE_BEGIN (detail)
4545
46- #ifndef PYBIND11_CONSTINIT
47- # if __cplusplus >= 202002L
48- # define PYBIND11_CONSTINIT constinit
49- # else
50- # define PYBIND11_CONSTINIT
51- # endif
52- #endif
53-
5446// Main author of this class: jbms@
5547template <typename T>
5648class LazyInitializeAtLeastOnceDestroyNever {
@@ -255,7 +247,7 @@ struct npy_api {
255247 };
256248
257249 static npy_api &get () {
258- PYBIND11_CONSTINIT static LazyInitializeAtLeastOnceDestroyNever<npy_api> api_init;
250+ static LazyInitializeAtLeastOnceDestroyNever<npy_api> api_init;
259251 return api_init.Get (lookup);
260252 }
261253
@@ -693,8 +685,7 @@ class dtype : public object {
693685
694686private:
695687 static object &_dtype_from_pep3118 () {
696- PYBIND11_CONSTINIT static detail::LazyInitializeAtLeastOnceDestroyNever<object>
697- imported_obj;
688+ static detail::LazyInitializeAtLeastOnceDestroyNever<object> imported_obj;
698689 return imported_obj.Get ([]() {
699690 return detail::import_numpy_core_submodule (" _internal" ).attr (" _dtype_from_pep3118" );
700691 });
You can’t perform that action at this time.
0 commit comments