From 7b0924fe289e1d1a4ab131c819df116956141a4e Mon Sep 17 00:00:00 2001 From: keldu Date: Fri, 24 Dec 2021 22:51:46 +0100 Subject: [PATCH] fixed wrong provided reader message type --- source/kelgin/message_container.h | 16 ++++++++-------- source/kelgin/proto_kel.h | 3 ++- source/kelgin/schema.h | 26 +++++++++++++------------- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/source/kelgin/message_container.h b/source/kelgin/message_container.h index 1ee2abd..3cf244b 100644 --- a/source/kelgin/message_container.h +++ b/source/kelgin/message_container.h @@ -138,42 +138,42 @@ public: template struct PrimitiveTypeHelper; template <> -struct PrimitiveTypeHelper> { +struct PrimitiveTypeHelper> { using Type = int8_t; }; template <> -struct PrimitiveTypeHelper> { +struct PrimitiveTypeHelper> { using Type = int16_t; }; template <> -struct PrimitiveTypeHelper> { +struct PrimitiveTypeHelper> { using Type = int32_t; }; template <> -struct PrimitiveTypeHelper> { +struct PrimitiveTypeHelper> { using Type = int64_t; }; template <> -struct PrimitiveTypeHelper> { +struct PrimitiveTypeHelper> { using Type = uint8_t; }; template <> -struct PrimitiveTypeHelper> { +struct PrimitiveTypeHelper> { using Type = uint16_t; }; template <> -struct PrimitiveTypeHelper> { +struct PrimitiveTypeHelper> { using Type = uint32_t; }; template <> -struct PrimitiveTypeHelper> { +struct PrimitiveTypeHelper> { using Type = uint64_t; }; diff --git a/source/kelgin/proto_kel.h b/source/kelgin/proto_kel.h index eeb347b..c379753 100644 --- a/source/kelgin/proto_kel.h +++ b/source/kelgin/proto_kel.h @@ -213,7 +213,8 @@ struct ProtoKelEncodeImpl< template static typename std::enable_if::type - encodeMembers(typename Container::template ElementType::Reader, + encodeMembers(typename Message...>, + Container>::Reader, Buffer &) { return noError(); } diff --git a/source/kelgin/schema.h b/source/kelgin/schema.h index 7798daf..40bdb3e 100644 --- a/source/kelgin/schema.h +++ b/source/kelgin/schema.h @@ -22,27 +22,27 @@ template struct Tuple {}; struct String {}; -struct SignedIntegral {}; -struct UnsignedIntegral {}; +struct SignedInteger {}; +struct UnsignedInteger {}; struct FloatingPoint {}; template struct Primitive { - static_assert(((std::is_same_v || - std::is_same_v)&&(N == 1 || N == 2 || - N == 4 || N == 8)) || + static_assert(((std::is_same_v || + std::is_same_v)&&(N == 1 || N == 2 || + N == 4 || N == 8)) || (std::is_same_v && (N == 4 || N == 8)), "Primitive Type is not supported"); }; -using Int8 = Primitive; -using Int16 = Primitive; -using Int32 = Primitive; -using Int64 = Primitive; +using Int8 = Primitive; +using Int16 = Primitive; +using Int32 = Primitive; +using Int64 = Primitive; -using UInt8 = Primitive; -using UInt16 = Primitive; -using UInt32 = Primitive; -using UInt64 = Primitive; +using UInt8 = Primitive; +using UInt16 = Primitive; +using UInt32 = Primitive; +using UInt64 = Primitive; using Float32 = Primitive; using Float64 = Primitive;