Searched refs:object_or_cast (Results 1 – 2 of 2) sorted by relevance
483 auto object_or_cast(T &&o) -> decltype(std::forward<T>(o)) { return std::forward<T>(o); }486 object object_or_cast(T &&o);488 inline handle object_or_cast(PyObject *ptr) { return ptr; } in object_or_cast() function505 Policy::set(obj, key, object_or_cast(std::forward<T>(value)));508 get_cache() = reinterpret_borrow<object>(object_or_cast(std::forward<T>(value)));1301 return PyDict_Contains(m_ptr, detail::object_or_cast(std::forward<T>(key)).ptr()) == 1; in contains()1342 PyList_Append(m_ptr, detail::object_or_cast(std::forward<T>(val)).ptr()); in append()1346 detail::object_or_cast(std::forward<T>(val)).ptr()); in insert()1362 return PySet_Add(m_ptr, detail::object_or_cast(std::forward<T>(val)).ptr()) == 0; in add()1366 return PySet_Contains(m_ptr, detail::object_or_cast(std::forward<T>(val)).ptr()) == 1; in contains()
1814 object object_or_cast(T &&o) { return pybind11::cast(std::forward<T>(o)); }