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

Function to_argument_vector

tests/test_with_catch/test_argument_vector.cpp:12–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11namespace {
12argument_vector to_argument_vector(const std::vector<py::handle> &v) {
13 argument_vector result;
14 result.reserve(v.size());
15 for (const auto x : v) {
16 result.push_back(x);
17 }
18 return result;
19}
20
21std::vector<std::vector<py::handle>> get_sample_argument_vector_contents() {
22 return std::vector<std::vector<py::handle>>{

Callers 1

Calls 3

reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected