[libcxx-commits] [PATCH] D71395: [libc++] Fix -Wdeprecated-copy warnings in __bit_reference

David Blaikie via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 11 23:48:20 PST 2019

dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.
Herald added a reviewer: mclow.lists.

Sounds good to me.

(my thought process, for posterity (beyond the fact that this code change makes explicit what was already happening/it doesn't change behavior): copy constructing a reference binds the new copy to the same entity as the original. This is different from copy assigning, which doesn't bind/rebind, but instead changes the value of the object referenced by the LHS reference to match the value of the object referenced by the RHS reference - so it seems good/proper that these types would have a non-trivial copy assignment, while wanting to opt back into the default copy construction)

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list