Created on 2018-06-29.00:00:00 last changed 46 months ago
Proposed resolution:
This wording is relative to N4750.
Change [syncstream.osyncstream.overview], class template basic_osyncstream synopsis, as indicated:
namespace std {
template<class charT, class traits, class Allocator>
class basic_osyncstream : public basic_ostream<charT, traits> {
public:
[…]
// [syncstream.osyncstream.members], member functions
void emit();
streambuf_type* get_wrapped() const noexcept;
syncbuf_type* rdbuf() const noexcept { return const_cast<syncbuf_type*>(&sb); }
[…]
};
}
[ 2018-11, Adopted in San Diego ]
[ 2018-07-20 Status set to Tentatively Ready after five positive votes on the reflector. ]
The current specification of basic_osyncstream::rdbuf() is
syncbuf_type* rdbuf() const noexcept { return &sb; }
This is ill-formed because the exposition-only member sb is const inside this const member function, but the return type is a pointer to non-const syncbuf_type. It needs to cast away the constness, consistent with the other streams with embedded stream buffers (such as string and file streams).
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2018-11-12 04:39:29 | admin | set | messages: + msg10196 |
2018-11-12 04:39:29 | admin | set | status: voting -> wp |
2018-10-08 05:13:59 | admin | set | status: ready -> voting |
2018-07-20 21:06:57 | admin | set | messages: + msg10034 |
2018-07-20 21:06:57 | admin | set | status: new -> ready |
2018-06-29 21:35:39 | admin | set | messages: + msg9998 |
2018-06-29 00:00:00 | admin | create |