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

Method arg_v

include/pybind11/cast.h:1995–2010  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1993private:
1994 template <typename T>
1995 arg_v(arg &&base, T &&x, const char *descr = nullptr)
1996 : arg(base), value(reinterpret_steal<object>(detail::make_caster<T>::cast(
1997 std::forward<T>(x), return_value_policy::automatic, {}))),
1998 descr(descr)
1999#if defined(PYBIND11_DETAILED_ERROR_MESSAGES)
2000 ,
2001 type(type_id<T>())
2002#endif
2003 {
2004 // Workaround! See:
2005 // https://github.com/pybind/pybind11/issues/2336
2006 // https://github.com/pybind/pybind11/pull/2685#issuecomment-731286700
2007 if (PyErr_Occurred()) {
2008 PyErr_Clear();
2009 }
2010 }
2011
2012public:
2013 /// Direct construction with name, default, and description

Callers

nothing calls this directly

Calls 2

castFunction · 0.70
argClass · 0.70

Tested by

no test coverage detected