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

Method compare

include/pybind11/buffer_info.h:190–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188template <typename T, typename SFINAE>
189struct compare_buffer_info {
190 static bool compare(const buffer_info &b) {
191 // NOLINTNEXTLINE(bugprone-sizeof-expression) Needed for `PyObject *`
192 return b.format == format_descriptor<T>::format() && b.itemsize == (ssize_t) sizeof(T);
193 }
194};
195
196template <typename T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected