We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4eb5643 commit f9ee0f3Copy full SHA for f9ee0f3
src/serialize.h
@@ -520,6 +520,15 @@ struct VarIntFormatter
520
}
521
};
522
523
+/** Serialization wrapper class for custom integers and enums.
524
+ *
525
+ * It permits specifying the serialized size (1 to 8 bytes) and endianness.
526
527
+ * Use the big endian mode for values that are stored in memory in native
528
+ * byte order, but serialized in big endian notation. This is only intended
529
+ * to implement serializers that are compatible with existing formats, and
530
+ * its use is not recommended for new data structures.
531
+ */
532
template<int Bytes, bool BigEndian = false>
533
struct CustomUintFormatter
534
{
0 commit comments