[+] bool ByteBuffer::WriteTagged(T &in) (...for non-const ::Serialize)

This commit is contained in:
Reece Wilson 2023-10-24 18:24:35 +01:00
parent ca3bded0d4
commit fb97c282a2
2 changed files with 10 additions and 0 deletions

View File

@ -538,6 +538,9 @@ namespace Aurora::Memory
template<typename T>
bool WriteTagged(const T &in);
template<typename T>
bool WriteTagged(T &in);
template<typename T>
bool ReadTagged(T &out);

View File

@ -453,6 +453,13 @@ namespace Aurora::Memory
return Write(in);
}
template<typename T>
bool ByteBuffer::WriteTagged(T &in)
{
Write(__detail::TypeToID<T>());
return Write(in);
}
template<typename T>
bool ByteBuffer::ReadTagged(T &out)
{