mirror of
https://github.com/pybind/pybind11.git
synced 2026-06-08 15:29:45 +00:00
support docstrings in enum::value() (#1160)
This commit is contained in:
@@ -15,9 +15,9 @@ TEST_SUBMODULE(enums, m) {
|
||||
EOne = 1,
|
||||
ETwo
|
||||
};
|
||||
py::enum_<UnscopedEnum>(m, "UnscopedEnum", py::arithmetic())
|
||||
.value("EOne", EOne)
|
||||
.value("ETwo", ETwo)
|
||||
py::enum_<UnscopedEnum>(m, "UnscopedEnum", py::arithmetic(), "An unscoped enumeration")
|
||||
.value("EOne", EOne, "Docstring for EOne")
|
||||
.value("ETwo", ETwo, "Docstring for ETwo")
|
||||
.export_values();
|
||||
|
||||
// test_scoped_enum
|
||||
|
||||
Reference in New Issue
Block a user