[libcxx-commits] [PATCH] D122092: [libc++] `bitset::operator[] const` should return bool
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 28 12:25:51 PDT 2022
ldionne added a comment.
What an annoying "extension". The intent is good, however it results in our implementation being clearly non-conforming. I'm in favour of this, and it's a shame that it has to be guarded behind an ABI check.
Can you please add a test that checks for:
typename Container::const_reference cr0 = c[0];
c[0] = 1;
assert(cr0 == 1);
at runtime (and a corresponding test case for when `const_reference` is `bool`)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122092/new/
https://reviews.llvm.org/D122092
More information about the libcxx-commits
mailing list