File tree 1 file changed +2
-11
lines changed
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
43
43
44
44
PYBIND11_NAMESPACE_BEGIN (detail)
45
45
46
- #ifndef PYBIND11_CONSTINIT
47
- # if __cplusplus >= 202002L
48
- # define PYBIND11_CONSTINIT constinit
49
- # else
50
- # define PYBIND11_CONSTINIT
51
- # endif
52
- #endif
53
-
54
46
// Main author of this class: jbms@
55
47
template <typename T>
56
48
class LazyInitializeAtLeastOnceDestroyNever {
@@ -255,7 +247,7 @@ struct npy_api {
255
247
};
256
248
257
249
static npy_api &get () {
258
- PYBIND11_CONSTINIT static LazyInitializeAtLeastOnceDestroyNever<npy_api> api_init;
250
+ static LazyInitializeAtLeastOnceDestroyNever<npy_api> api_init;
259
251
return api_init.Get (lookup);
260
252
}
261
253
@@ -693,8 +685,7 @@ class dtype : public object {
693
685
694
686
private:
695
687
static object &_dtype_from_pep3118 () {
696
- PYBIND11_CONSTINIT static detail::LazyInitializeAtLeastOnceDestroyNever<object>
697
- imported_obj;
688
+ static detail::LazyInitializeAtLeastOnceDestroyNever<object> imported_obj;
698
689
return imported_obj.Get ([]() {
699
690
return detail::import_numpy_core_submodule (" _internal" ).attr (" _dtype_from_pep3118" );
700
691
});
You can’t perform that action at this time.
0 commit comments