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

Function one_to_n

tests/test_stl_binders.cpp:46–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45template <class Container>
46Container *one_to_n(int n) {
47 auto *v = new Container();
48 for (int i = 1; i <= n; i++) {
49 v->emplace_back(i);
50 }
51 return v;
52}
53
54template <class Map>
55Map *times_ten(int n) {

Callers

nothing calls this directly

Calls 1

emplace_backMethod · 0.80

Tested by

no test coverage detected