26 static constexpr
const char value[3] = {
'Z',
c,
'\0'};
27 static std::string
format() {
return std::string(value); }
30 #ifndef PYBIND11_CPP17 43 static constexpr
bool value =
true;
54 if (!convert && !PyComplex_Check(src.
ptr())) {
57 Py_complex
result = PyComplex_AsCComplex(src.
ptr());
58 if (result.real == -1.0 && PyErr_Occurred()) {
62 value = std::complex<T>((
T) result.real, (
T) result.imag);
68 return PyComplex_FromDoubles((
double) src.real(), (double) src.imag());
static handle cast(const std::complex< T > &src, return_value_policy, handle)
#define PYBIND11_NAMESPACE
Eigen::Triplet< double > T
typename std::enable_if< B, T >::type enable_if_t
from cpp_future import (convenient aliases from C++14/17)
bool load(handle src, bool convert)
PyObject * ptr() const
Return the underlying PyObject * pointer.
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.
#define PYBIND11_TYPE_CASTER(type, py_name)
#define PYBIND11_NAMESPACE_END(name)
static BinaryMeasurement< Rot3 > convert(const BetweenFactor< Pose3 >::shared_ptr &f)
#define PYBIND11_NAMESPACE_BEGIN(name)