17 #define TEST_SUBMODULE(name, variable) \ 18 void test_submodule_##name(py::module_ &); \ 19 test_initializer name(#name, test_submodule_##name); \ 20 void test_submodule_##name(py::module_ &(variable)) 32 void set(
int set) {
i =
set; }
44 IncType(IncType &&) =
delete;
45 IncType &operator=(
const IncType &) =
delete;
46 IncType &operator=(IncType &&) =
delete;
65 return py::str(
"rvalue").release();
68 return py::str(
"lvalue").release();
77 message = "pybind11-bound class '.+' is using an old-style placement-new '(?:__init__|__setstate__)' which has been deprecated" 80 with warnings.catch_warnings(): 81 warnings.filterwarnings("ignore", message=message, category=FutureWarning) 84 py::dict(py::arg("body") = py::cpp_function(body)));
void ignoreOldStyleInitWarnings(F &&body)
IncType(const IncType &other)
Dummy type which is not exported anywhere – something to trigger a conversion error.
void exec(const str &expr, object global=globals(), object local=object())
void(*)(py::module_ &) Initializer
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArgReturnType arg() const
static handle cast(RValueCaster &&, return_value_policy, handle)
constexpr descr< N - 1 > const_name(char const (&text)[N])
return_value_policy
Approach used to cast a previously unknown C++ instance into a Python object.
static handle cast(const RValueCaster &, return_value_policy, handle)
#define PYBIND11_TYPE_CASTER(type, py_name)
#define PYBIND11_NAMESPACE_END(name)
A simple union for basic testing.
#define PYBIND11_NAMESPACE_BEGIN(name)