I'm currently reading the code of RapidJSON, and I don't understand this bit of code:
//! Reserve n characters for writing to a stream.
template<typename Stream>
inline void PutReserve(Stream& stream, size_t count) {
(void)stream;
(void)count;
}
//! Put N copies of a character to a stream.
template<typename Stream, typename Ch>
inline void PutN(Stream& stream, Ch c, size_t n) {
PutReserve(stream, n);// I think this function does nothing
for (size_t i = 0; i < n; i++)
PutUnsafe(stream, c);
}
Can anyone explain the purpose of 'PutReserve' for me?