summaryrefslogtreecommitdiff
path: root/modules/codec
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2024-04-09 13:22:57 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2024-04-09 13:23:10 +0200
commit73a532a06e06bb020391e30eb9baaf28a2e1f9ea (patch)
tree48461acdb5a6dbc7ae7a7419b59e05615819f05a /modules/codec
parent608cbb8ea96a402e3878b33c328e93cb58a0e5de (diff)
codec: Fixed missing has_key function
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 {