mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
allow enums values to be cast to integers
This commit is contained in:
parent
ac0fde988a
commit
6918922332
@ -812,6 +812,7 @@ public:
|
||||
((it == entries->end()) ? std::string("???")
|
||||
: std::string(it->second));
|
||||
});
|
||||
this->def("__int__", [](Type value) { return (int) value; });
|
||||
m_entries = entries;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user