Commit 7571786
committed
[ostream.manip] Introduce SYNCBUF to detect basic_syncbuf
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.1 parent 36c6132 commit 7571786
1 file changed
Lines changed: 24 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6771 | 6771 | | |
6772 | 6772 | | |
6773 | 6773 | | |
| 6774 | + | |
| 6775 | + | |
| 6776 | + | |
| 6777 | + | |
| 6778 | + | |
| 6779 | + | |
| 6780 | + | |
| 6781 | + | |
| 6782 | + | |
| 6783 | + | |
| 6784 | + | |
| 6785 | + | |
| 6786 | + | |
| 6787 | + | |
| 6788 | + | |
| 6789 | + | |
| 6790 | + | |
| 6791 | + | |
6774 | 6792 | | |
6775 | 6793 | | |
6776 | 6794 | | |
| |||
6834 | 6852 | | |
6835 | 6853 | | |
6836 | 6854 | | |
6837 | | - | |
6838 | | - | |
6839 | | - | |
6840 | | - | |
| 6855 | + | |
| 6856 | + | |
6841 | 6857 | | |
6842 | | - | |
6843 | | - | |
6844 | | - | |
6845 | | - | |
6846 | | - | |
6847 | | - | |
6848 | 6858 | | |
6849 | 6859 | | |
6850 | 6860 | | |
| |||
6860 | 6870 | | |
6861 | 6871 | | |
6862 | 6872 | | |
6863 | | - | |
6864 | | - | |
6865 | | - | |
6866 | | - | |
| 6873 | + | |
| 6874 | + | |
6867 | 6875 | | |
6868 | 6876 | | |
6869 | 6877 | | |
| |||
6881 | 6889 | | |
6882 | 6890 | | |
6883 | 6891 | | |
6884 | | - | |
6885 | | - | |
6886 | | - | |
6887 | | - | |
| 6892 | + | |
| 6893 | + | |
6888 | 6894 | | |
6889 | 6895 | | |
6890 | 6896 | | |
| |||
0 commit comments