cppyabm
1.0.17
An agent-based library to integrate C++ and Python
|
|
Go to the documentation of this file.
5 #if defined(_MSC_VER) && _MSC_VER < 1910
7 # pragma warning(disable: 4503) // warning C4503: decorated name length exceeded, name was truncated
11 using namespace pybind11::literals;
14 using Initializer = void (*)(py::module_ &);
21 #define TEST_SUBMODULE(name, variable) \
22 void test_submodule_##name(py::module_ &); \
23 test_initializer name(#name, test_submodule_##name); \
24 void test_submodule_##name(py::module_ &variable)
34 UserType(
int i) :
i(
i) { }
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)
83 )", py::dict(py::arg("body") = py::cpp_function(body)));
#define PYBIND11_NAMESPACE_BEGIN(name)
#define PYBIND11_NAMESPACE_END(name)
constexpr descr< N - 1 > _(char const(&text)[N])
void exec(str expr, object global=globals(), object local=object())
A simple union for basic testing.
Dummy type which is not exported anywhere – something to trigger a conversion error.
PYBIND11_TYPE_CASTER(RValueCaster, _("RValueCaster"))
void ignoreOldStyleInitWarnings(F &&body)
static handle cast(RValueCaster &&, return_value_policy, handle)
IncType & operator=(IncType &&)=delete
IncType(IncType &&)=delete
static handle cast(const RValueCaster &, return_value_policy, handle)
detail::initimpl::constructor< Args... > init()
Binds an existing constructor taking arguments Args...
return_value_policy
Approach used to cast a previously unknown C++ instance into a Python object.
IncType(const IncType &other)
IncType & operator=(const IncType &)=delete