fixed wrong provided reader message type
This commit is contained in:
parent
2e4308fd72
commit
7b0924fe28
|
@ -138,42 +138,42 @@ public:
|
|||
template <class T> struct PrimitiveTypeHelper;
|
||||
|
||||
template <>
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::SignedIntegral, 1>> {
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::SignedInteger, 1>> {
|
||||
using Type = int8_t;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::SignedIntegral, 2>> {
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::SignedInteger, 2>> {
|
||||
using Type = int16_t;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::SignedIntegral, 4>> {
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::SignedInteger, 4>> {
|
||||
using Type = int32_t;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::SignedIntegral, 8>> {
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::SignedInteger, 8>> {
|
||||
using Type = int64_t;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::UnsignedIntegral, 1>> {
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::UnsignedInteger, 1>> {
|
||||
using Type = uint8_t;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::UnsignedIntegral, 2>> {
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::UnsignedInteger, 2>> {
|
||||
using Type = uint16_t;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::UnsignedIntegral, 4>> {
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::UnsignedInteger, 4>> {
|
||||
using Type = uint32_t;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::UnsignedIntegral, 8>> {
|
||||
struct PrimitiveTypeHelper<schema::Primitive<schema::UnsignedInteger, 8>> {
|
||||
using Type = uint64_t;
|
||||
};
|
||||
|
||||
|
|
|
@ -213,7 +213,8 @@ struct ProtoKelEncodeImpl<
|
|||
|
||||
template <size_t i = 0>
|
||||
static typename std::enable_if<i == sizeof...(V), Error>::type
|
||||
encodeMembers(typename Container::template ElementType<i>::Reader,
|
||||
encodeMembers(typename Message<schema::Union<schema::NamedMember<V, K>...>,
|
||||
Container>::Reader,
|
||||
Buffer &) {
|
||||
return noError();
|
||||
}
|
||||
|
|
|
@ -22,27 +22,27 @@ template <class... T> struct Tuple {};
|
|||
|
||||
struct String {};
|
||||
|
||||
struct SignedIntegral {};
|
||||
struct UnsignedIntegral {};
|
||||
struct SignedInteger {};
|
||||
struct UnsignedInteger {};
|
||||
struct FloatingPoint {};
|
||||
|
||||
template <class T, size_t N> struct Primitive {
|
||||
static_assert(((std::is_same_v<T, SignedIntegral> ||
|
||||
std::is_same_v<T, UnsignedIntegral>)&&(N == 1 || N == 2 ||
|
||||
N == 4 || N == 8)) ||
|
||||
static_assert(((std::is_same_v<T, SignedInteger> ||
|
||||
std::is_same_v<T, UnsignedInteger>)&&(N == 1 || N == 2 ||
|
||||
N == 4 || N == 8)) ||
|
||||
(std::is_same_v<T, FloatingPoint> && (N == 4 || N == 8)),
|
||||
"Primitive Type is not supported");
|
||||
};
|
||||
|
||||
using Int8 = Primitive<SignedIntegral, 1>;
|
||||
using Int16 = Primitive<SignedIntegral, 2>;
|
||||
using Int32 = Primitive<SignedIntegral, 4>;
|
||||
using Int64 = Primitive<SignedIntegral, 8>;
|
||||
using Int8 = Primitive<SignedInteger, 1>;
|
||||
using Int16 = Primitive<SignedInteger, 2>;
|
||||
using Int32 = Primitive<SignedInteger, 4>;
|
||||
using Int64 = Primitive<SignedInteger, 8>;
|
||||
|
||||
using UInt8 = Primitive<UnsignedIntegral, 1>;
|
||||
using UInt16 = Primitive<UnsignedIntegral, 2>;
|
||||
using UInt32 = Primitive<UnsignedIntegral, 4>;
|
||||
using UInt64 = Primitive<UnsignedIntegral, 8>;
|
||||
using UInt8 = Primitive<UnsignedInteger, 1>;
|
||||
using UInt16 = Primitive<UnsignedInteger, 2>;
|
||||
using UInt32 = Primitive<UnsignedInteger, 4>;
|
||||
using UInt64 = Primitive<UnsignedInteger, 8>;
|
||||
|
||||
using Float32 = Primitive<FloatingPoint, 4>;
|
||||
using Float64 = Primitive<FloatingPoint, 8>;
|
||||
|
|
Loading…
Reference in New Issue