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

Method contains

include/pybind11/stl_bind.h:671–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

669 size_t len() override { return map.size(); }
670 iterator iter() override { return make_key_iterator(map.begin(), map.end()); }
671 bool contains(const handle &k) override {
672 try {
673 return map.find(k.template cast<typename Map::key_type>()) != map.end();
674 } catch (const cast_error &) {
675 return false;
676 }
677 }
678 Map &map;
679};
680

Callers

nothing calls this directly

Calls 2

findMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected