jwakely · GitHub

@jwakely

This attempts to address the problem of `Allocator` being mentioned in
the function descriptions without being defined. We cannot say that
> `os.rdbuf()` is a `basic_syncbuf<charT, traits, Allocator>*`
because firstly, that type is not defined, and secondly `os.rdbuf()` is
a `basic_streambuf<charT, traits>*` and not any other type.
By introducing SYNCBUF we can define the manipulators properly, by
talking about a base class subobject rather than "is a".
This introduces an apparently normative change that the syncbuf type
must not use a program-defined specialization. Without that additional
restriction the implementation suggested by the note doesn't work,
because program-defined specializations cannot derive from the
intermediate base class, and therefore cannot be detected by SYNCBUF.

Read the original on github.com ↗