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

Method tuple

include/pybind11/pytypes.h:2175–2179  ·  view source on GitHub ↗

Some compilers generate link errors when using `const SzType &` here:

Source from the content-addressed store, hash-verified

2173 detail::enable_if_t<std::is_integral<SzType>::value, int> = 0>
2174 // Some compilers generate link errors when using `const SzType &` here:
2175 explicit tuple(SzType size = 0) : object(PyTuple_New(ssize_t_cast(size)), stolen_t{}) {
2176 if (!m_ptr) {
2177 pybind11_fail("Could not allocate tuple object!");
2178 }
2179 }
2180 size_t size() const { return static_cast<size_t>(PyTuple_Size(m_ptr)); }
2181 bool empty() const { return size() == 0; }
2182 detail::tuple_accessor operator[](size_t index) const { return {*this, index}; }

Callers

nothing calls this directly

Calls 1

ssize_t_castFunction · 0.85

Tested by

no test coverage detected