33using LocalMap = std::unordered_map<std::string, LocalType>;
36using NonLocalMap = std::unordered_map<std::string, NonLocalType>;
43 const char *
what() const noexcept
override {
return message.c_str(); }
53 const char *
what() const noexcept
override {
return message.c_str(); }
68template <
typename T,
int Adjust = 0,
typename... Args>
70 return py::class_<T>(std::forward<Args>(
args)...).def(py::init<int>()).def(
"get", [](T &i) {
Simple class used to test py::local:
const char * what() const noexcept override
LocalException(const char *m)
const char * what() const noexcept override
LocalSimpleException(const char *m)
const std::string & name() const
#define PYBIND11_MAKE_OPAQUE(...)
@ move
Use std::move to move the return value contents into a new instance that will be owned by Python.
std::unordered_map< std::string, uint8_t > NonLocalMap2
std::vector< NonLocalType > NonLocalVec
std::vector< LocalType > LocalVec
std::vector< NonLocal2 > LocalVec2
std::unordered_map< std::string, LocalType > LocalMap
std::vector< NonLocal2 > NonLocalVec2
std::unordered_map< std::string, NonLocalType > NonLocalMap
py::class_< T > bind_local(Args &&...args)
Annotation for function names.