[libcxx-commits] [PATCH] D88849: [libc++] Make sure __clear_and_shrink() maintains string invariants
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 5 15:00:31 PDT 2020
ldionne marked an inline comment as done.
ldionne added inline comments.
================
Comment at: libcxx/include/string:3962
__set_short_size(0);
+ traits_type::assign(*__get_short_pointer(), value_type());
}
----------------
vsk wrote:
> __invariants checks that `data()[0] == value_type(0)` -- is this guaranteed to be equal to `value_type()`?
It looks to me like the invariants check is the odd one out here, since we use `value_type()` everywhere else.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88849/new/
https://reviews.llvm.org/D88849
More information about the libcxx-commits
mailing list