summaryrefslogtreecommitdiff
path: root/modules/codec
diff options
context:
space:
mode:
Diffstat (limited to 'modules/codec')
-rw-r--r--modules/codec/c++/schema_factory.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/codec/c++/schema_factory.hpp b/modules/codec/c++/schema_factory.hpp
index 6b824f4..7eb3e5c 100644
--- a/modules/codec/c++/schema_factory.hpp
+++ b/modules/codec/c++/schema_factory.hpp
@@ -46,6 +46,11 @@ public:
template<typename... T, string_literal... Keys>
struct schema_factory<schema::Union<schema::Member<T,Keys>...>> {
using Schema = schema::Union<schema::Member<T,Keys>...>;
+
+ template<string_literal KA>
+ static constexpr bool has_key() noexcept {
+ return schema_has_key<KA, Schema>::value;
+ }
template<typename TA, string_literal KA>
constexpr schema_factory<schema::Union<schema::Member<T,Keys>...,schema::Member<TA,KA>>> add() const noexcept {