MCPcopy Create free account
hub / github.com/pybind/pybind11 / NoDefaultCtor

Class NoDefaultCtor

tests/test_stl.cpp:206–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204 m.def("load_array", [](const std::array<int, 2> &a) { return a[0] == 1 && a[1] == 2; });
205
206 struct NoDefaultCtor {
207 explicit constexpr NoDefaultCtor(int val) : val{val} {}
208 int val;
209 };
210
211 struct NoDefaultCtorArray {
212 explicit constexpr NoDefaultCtorArray(int i)

Callers 1

NoDefaultCtorArrayMethod · 0.85

Calls

no outgoing calls

Tested by 1

NoDefaultCtorArrayMethod · 0.68