Go to the documentation of this file.
81 template <op_
id, op_type,
typename B,
typename L,
typename R>
85 template <op_
id id, op_type ot,
typename L,
typename R>
88 template <
typename Class,
typename... Extra>
96 template <
typename Class,
typename... Extra>
106 #define PYBIND11_BINARY_OPERATOR(id, rid, op, expr) \
107 template <typename B, typename L, typename R> \
108 struct op_impl<op_##id, op_l, B, L, R> { \
109 static char const *name() { return "__" #id "__"; } \
110 static auto execute(const L &l, const R &r) -> decltype(expr) { return (expr); } \
111 static B execute_cast(const L &l, const R &r) { return B(expr); } \
113 template <typename B, typename L, typename R> \
114 struct op_impl<op_##id, op_r, B, L, R> { \
115 static char const *name() { return "__" #rid "__"; } \
116 static auto execute(const R &r, const L &l) -> decltype(expr) { return (expr); } \
117 static B execute_cast(const R &r, const L &l) { return B(expr); } \
119 inline op_<op_##id, op_l, self_t, self_t> op(const self_t &, const self_t &) { \
120 return op_<op_##id, op_l, self_t, self_t>(); \
122 template <typename T> \
123 op_<op_##id, op_l, self_t, T> op(const self_t &, const T &) { \
124 return op_<op_##id, op_l, self_t, T>(); \
126 template <typename T> \
127 op_<op_##id, op_r, T, self_t> op(const T &, const self_t &) { \
128 return op_<op_##id, op_r, T, self_t>(); \
131 #define PYBIND11_INPLACE_OPERATOR(id, op, expr) \
132 template <typename B, typename L, typename R> \
133 struct op_impl<op_##id, op_l, B, L, R> { \
134 static char const *name() { return "__" #id "__"; } \
135 static auto execute(L &l, const R &r) -> decltype(expr) { return expr; } \
136 static B execute_cast(L &l, const R &r) { return B(expr); } \
138 template <typename T> \
139 op_<op_##id, op_l, self_t, T> op(const self_t &, const T &) { \
140 return op_<op_##id, op_l, self_t, T>(); \
143 #define PYBIND11_UNARY_OPERATOR(id, op, expr) \
144 template <typename B, typename L> \
145 struct op_impl<op_##id, op_u, B, L, undefined_t> { \
146 static char const *name() { return "__" #id "__"; } \
147 static auto execute(const L &l) -> decltype(expr) { return expr; } \
148 static B execute_cast(const L &l) { return B(expr); } \
150 inline op_<op_##id, op_u, self_t, undefined_t> op(const self_t &) { \
151 return op_<op_##id, op_u, self_t, undefined_t>(); \
193 #undef PYBIND11_BINARY_OPERATOR
194 #undef PYBIND11_INPLACE_OPERATOR
195 #undef PYBIND11_UNARY_OPERATOR
#define PYBIND11_INPLACE_OPERATOR(id, op, expr)
void execute_cast(Class &cl, const Extra &...extra) const
Annotation for operators.
#define PYBIND11_NAMESPACE_END(name)
#define PYBIND11_BINARY_OPERATOR(id, rid, op, expr)
double mul(const double &a, const double &b)
void execute(Class &cl, const Extra &...extra) const
static constexpr bool op_enable_if_hook
#define PYBIND11_NAMESPACE_BEGIN(name)
Operator implementation generator.
op_id
Enumeration with all supported operator types.
self_t __self()
Don't warn about an unused variable.
typename std::conditional< B, T, F >::type conditional_t
Type for an unused type slot.
graph add(PriorFactor< Pose2 >(1, priorMean, priorNoise))
static const Line3 l(Rot3(), 1, 1)
#define PYBIND11_UNARY_OPERATOR(id, op, expr)
base template of operator implementations
Rot2 R(Rot2::fromAngle(0.1))
EIGEN_DONT_INLINE T sub(T a, T b)
gtsam
Author(s):
autogenerated on Thu Dec 19 2024 04:02:03