[libcxx-commits] [PATCH] D67086: Implement syncstream (p0053)

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jan 23 14:23:32 PST 2021


zoecarver added inline comments.


================
Comment at: libcxx/include/syncstream:52
+        basic_syncbuf& operator=(basic_syncbuf&&);
+        void swap(basic_syncbuf&);
+
----------------
zoecarver wrote:
> Mordante wrote:
> > @mclow.lists Do you know whether these functions should be `noexcept`? There's a contraction in the standard
> > http://eel.is/c++draft/syncstream.syncbuf#assign
> > ```
> >    // [syncstream.syncbuf.assign], assignment and swap
> >     basic_syncbuf& operator=(basic_syncbuf&&);
> >     void swap(basic_syncbuf&);
> > ```
> > http://eel.is/c++draft/syncstream.syncbuf#assign
> > `basic_syncbuf& operator=(basic_syncbuf&& rhs) noexcept;`
> > `void swap(basic_syncbuf& other) noexcept;`
> > 
> > The move constructor is not marked as `noexcept` and neither is `emit` so I assume [syncstream.syncbuf.assign] is wrong.
> > 
> See https://cplusplus.github.io/LWG/issue3498 I'm going to leave them as not-noexcept until we determine a resolution for this. 
Also, I just realized, the assignment operator 100% has to be noexcept because it calls emit which is designed to sometimes throw. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67086/new/

https://reviews.llvm.org/D67086



More information about the libcxx-commits mailing list