summaryrefslogtreecommitdiff
path: root/modules/codec/c++/schema.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/codec/c++/schema.hpp')
-rw-r--r--modules/codec/c++/schema.hpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/codec/c++/schema.hpp b/modules/codec/c++/schema.hpp
index 3c5bce5..3d20c10 100644
--- a/modules/codec/c++/schema.hpp
+++ b/modules/codec/c++/schema.hpp
@@ -102,7 +102,7 @@ using Float64 = Primitive<FloatingPoint, 8>;
/**
* Classes allowing to distinguish Ints from VarInts
*/
-template<typename T, std::size_t MaxLen>
+template<typename T, uint64_t MaxLen>
struct VariableLengthPrimitive {
static constexpr string_literal name = "VariableLengthPrimitive";
};
@@ -110,6 +110,15 @@ struct VariableLengthPrimitive {
using VarInt = VariableLengthPrimitive<SignedInteger, 5>;
using VarLong = VariableLengthPrimitive<SignedInteger, 10>;
+template<typename PrimA, typename PrimB>
+struct MixedPrecision {
+ using InterfaceSchema = PrimA;
+ using StorageSchema = PrimB;
+
+ static_assert(is_primitive<PrimA>::value, "InterfaceSchema needs to be a Primitive");
+ static_assert(is_primitive<PrimB>::value, "StorageSchema needs to be a Primitive");
+};
+
/**
* Classes enabling Rpc calls
*/