[libcxx-commits] [PATCH] D117736: [libc++][P2321R2] Add vector<bool>::reference::operator=(bool) const

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 31 12:09:14 PST 2022


ldionne added inline comments.


================
Comment at: libcxx/test/std/containers/sequences/vector.bool/reference/assign_bool.pass.cpp:38
+  assert(vec[0]);
+  assert(!vec[1]);
 
----------------
Quuxplusone wrote:
> You'll need to either hide this under `TEST_STD_VER > 20` or remove the `_LIBCPP_STD_VER > 20` from `<__bit_reference>`. Honestly, I think removing it from `<__bit_reference>` might be the better way to go, for consistency's sake, but I'm prepared for that to be controversial. @ldionne thoughts? can we make `vector<bool>::iterator` indirectly writable in C++20/17/14/11/03 as well as 2b?
I would guard this with `TEST_STD_VER` since this is so easy to do, and that way we'll be more strictly conforming.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117736



More information about the libcxx-commits mailing list