In D110495 @vitaut suggested a different approach for the buffers. This is
a proof-of-concept of that idea.
- There's a new __output_buffer that contains the fixed size buffer. The __iterator_wrapper_buffer now always call the put of this buffer. When the buffer is full the buffer calls flush of one of the original buffers.
- The original buffers are still called buffer, but they're no longer buffers; they are more a write policy. This needs to be renamed once backported.
- All format functions call __output_buffer:;flush(). It would be possible to do that with an RAII buffer, but since flush then throw from the destructor some guards were needed. This slowed the performance.
- There are before and after benchmark timings using D110501 Before -> D110500 After -> This patch. In general this approach seems to be an improvement. The notable exception is when using std::list::begin() as iterator. This hasn't been investigated, since I don't expect this to be used in real applications.
- This patch is just for discussion, the code is not ready for review and should be folded back in the earlier patches in this series. Especially the two objects called buffer should be changed.
Depends on D110500
clang-format suggested style edits found: