Open SrTobi opened 9 years ago
The BitStream has a << operator which simply takes any argument and redirects it to BitStream::Write(...):
BitStream::Write(...)
template <class templateType> BitStream& operator<<(BitStream& out, templateType& c) { out.Write(c); return out; }
c (or the value referenced) however will never be changed, so that c should be const. Then the following code becomes valid:
c
const
RakString some_str() { ... } BitStream bs; bs << MessageID(0); bs << some_str();
The BitStream has a << operator which simply takes any argument and redirects it to
BitStream::Write(...)
:c
(or the value referenced) however will never be changed, so thatc
should beconst
. Then the following code becomes valid: