We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ecec62 commit 0a22829Copy full SHA for 0a22829
pybind11_protobuf/enum_type_caster.h
@@ -96,6 +96,15 @@ namespace detail {
96
//
97
constexpr bool pybind11_protobuf_enable_enum_type_caster(...) { return true; }
98
99
+#if defined(PYBIND11_HAS_NATIVE_ENUM)
100
+template <typename EnumType>
101
+struct type_caster_enum_type_enabled<
102
+ EnumType, std::enable_if_t<(::google::protobuf::is_proto_enum<EnumType>::value &&
103
+ pybind11_protobuf_enable_enum_type_caster(
104
+ static_cast<EnumType*>(nullptr)))>>
105
+ : std::false_type {};
106
+#endif
107
+
108
// Specialization of pybind11::detail::type_caster<T> for types satisfying
109
// ::google::protobuf::is_proto_enum.
110
template <typename EnumType>
0 commit comments