File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,18 @@ namespace gf {
117
117
return ar;
118
118
}
119
119
120
+ inline Serializer& operator |(Serializer& ar, char16_t data)
121
+ {
122
+ ar.write_u16 (data);
123
+ return ar;
124
+ }
125
+
126
+ inline Serializer& operator |(Serializer& ar, char32_t data)
127
+ {
128
+ ar.write_u32 (data);
129
+ return ar;
130
+ }
131
+
120
132
inline Serializer& operator |(Serializer& ar, const std::string& str)
121
133
{
122
134
ar.write_raw_string (str.data (), str.length ());
@@ -384,6 +396,22 @@ namespace gf {
384
396
return ar;
385
397
}
386
398
399
+ inline Deserializer& operator |(Deserializer& ar, char16_t & data)
400
+ {
401
+ uint16_t tmp = 0 ;
402
+ ar.read_u16 (&tmp);
403
+ data = tmp;
404
+ return ar;
405
+ }
406
+
407
+ inline Deserializer& operator |(Deserializer& ar, char32_t & data)
408
+ {
409
+ uint32_t tmp = 0 ;
410
+ ar.read_u32 (&tmp);
411
+ data = tmp;
412
+ return ar;
413
+ }
414
+
387
415
inline Deserializer& operator |(Deserializer& ar, std::string& str)
388
416
{
389
417
std::size_t size = 0 ;
You can’t perform that action at this time.
0 commit comments