Skip to content

Commit f9ee0f3

Browse files
committed
Add comments to CustomUintFormatter
1 parent 4eb5643 commit f9ee0f3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/serialize.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,15 @@ struct VarIntFormatter
520520
}
521521
};
522522

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+
*/
523532
template<int Bytes, bool BigEndian = false>
524533
struct CustomUintFormatter
525534
{

0 commit comments

Comments
 (0)