[libcxx-commits] [PATCH] D110994: [libc++] Make test_allocator constexpr-friendly for constexpr string/vector
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 5 14:14:47 PDT 2021
philnik marked an inline comment as done and an inline comment as not done.
philnik added inline comments.
================
Comment at: libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp:22
+test_allocator_statistics alloc_stats;
----------------
Quuxplusone wrote:
> For this `string` test in particular: Are you confident that the step from this point, to TEST_CONSTEXPR_CXX20, is a small step that "just works"?
> The step //should// be just
> - Move `alloc_stats` into a local variable of `test()`
> - Mark `test()` as `TEST_CONSTEXPR_CXX20` and have it return `bool`
> - `static_assert` on it
> But you should try it locally and make sure we haven't missed anything.
I merged the two and it works now with the current PR.
================
Comment at: libcxx/test/support/test_allocator.h:334
template <class T>
-class other_allocator
-{
- int data_;
+class other_allocator {
+ int data_;
----------------
I know this is another PR, but maybe ##other_allocator## should be renamed to ##not_noexcept_allocator## or something similar?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110994/new/
https://reviews.llvm.org/D110994
More information about the libcxx-commits
mailing list