[libcxx-commits] [libcxx] [libc++][syncbuf] Implements LWG3253. (PR #99778)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 30 09:39:08 PDT 2024
================
@@ -253,7 +255,10 @@ public:
// [syncstream.syncbuf.cons], construction and destruction
- _LIBCPP_HIDE_FROM_ABI explicit basic_syncbuf(streambuf_type* __obuf = nullptr)
+ _LIBCPP_HIDE_FROM_ABI basic_syncbuf()
+ : basic_syncbuf(nullptr) {}
----------------
ldionne wrote:
I think it's possible to test this. Before applying the LWG issue resolution, the following code would not have compiled:
```
basic_syncbuf f() {
return {};
}
```
But after the LWG issue resolution, this compiles because the default constructor is not explicit. So I think a test like this should work:
```
basic_syncbuf buf = {};
```
https://github.com/llvm/llvm-project/pull/99778
More information about the libcxx-commits
mailing list