[libcxx-commits] [PATCH] D120951: [libc++] Prepare string tests for constexpr
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 8 13:30:21 PST 2022
philnik added inline comments.
================
Comment at: libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp:41-67
template <class T>
struct poca_alloc {
typedef T value_type;
typedef std::true_type propagate_on_container_copy_assignment;
alloc_imp *imp;
----------------
Quuxplusone wrote:
> Pre-existing: It'd be awesome to `s/poca/pocca/` and move the operators into hidden friends. But in a separate PR for sure.
>
> You put the `poca_alloc` codepath on lines 109-127 under `!TEST_IS_CONSTANT_EVALUATED`; is it possible that these constexpr-qualifications are unnecessary?
Yep, it only has to be a constexpr type, so making the constructors constexpr is enough.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120951/new/
https://reviews.llvm.org/D120951
More information about the libcxx-commits
mailing list