diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2021-01-02 10:15:39 +0100 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2021-01-02 10:15:39 +0100 |
commit | e76cdab6dd77bad411e6ac9372ee527aff89ef17 (patch) | |
tree | e9868f05cf455336d75f33b1312d71034f8fb334 /3rdparty/pybind11/tests/test_tagbased_polymorphic.cpp | |
parent | c6cdf30501dcb2da01361229dd66a05dad73a132 (diff) | |
download | nextpnr-e76cdab6dd77bad411e6ac9372ee527aff89ef17.tar.gz nextpnr-e76cdab6dd77bad411e6ac9372ee527aff89ef17.tar.bz2 nextpnr-e76cdab6dd77bad411e6ac9372ee527aff89ef17.zip |
Update pybind11 to version 2.6.1
Diffstat (limited to '3rdparty/pybind11/tests/test_tagbased_polymorphic.cpp')
-rw-r--r-- | 3rdparty/pybind11/tests/test_tagbased_polymorphic.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/3rdparty/pybind11/tests/test_tagbased_polymorphic.cpp b/3rdparty/pybind11/tests/test_tagbased_polymorphic.cpp index 272e460c..838a168d 100644 --- a/3rdparty/pybind11/tests/test_tagbased_polymorphic.cpp +++ b/3rdparty/pybind11/tests/test_tagbased_polymorphic.cpp @@ -12,6 +12,12 @@ struct Animal { + // Make this type also a "standard" polymorphic type, to confirm that + // specializing polymorphic_type_hook using enable_if_t still works + // (https://github.com/pybind/pybind11/pull/2016/). + virtual ~Animal() = default; + + // Enum for tag-based polymorphism. enum class Kind { Unknown = 0, Dog = 100, Labrador, Chihuahua, LastDog = 199, @@ -111,7 +117,7 @@ namespace pybind11 { static const void *get(const itype *src, const std::type_info*& type) { type = src ? Animal::type_of_kind(src->kind) : nullptr; return src; } }; -} +} // namespace pybind11 TEST_SUBMODULE(tagbased_polymorphic, m) { py::class_<Animal>(m, "Animal") |