How to write to FArchive from derived class?

class FMyArchive : public FArchive
{

void MyWrite()
{
//???
int64 num = 123;
*((FArchive*)this)<<num; // it works.
*((FArchive*)this)<<TotalSize(); // compile error, TotalSize() returns int64.
}

};

Bonus feedback - Make “Write” functions for FArchive, i hate operators.

My example works.

this do not work:

 *((FArchive*)this)<<TotalSize(); // compile error, C++ doesnt recognize return value as int64.

UPD: i think i understand whats going on.
FArchive<< operator takes int64& - address, so i cant pass rvalue, i need variable.