[libcxx-commits] [PATCH] D124516: [libc++] Implement `std::expected` P0323R12
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 1 17:06:15 PDT 2022
EricWF added inline comments.
================
Comment at: libcxx/test/libcxx/utilities/expected/expected.expected/value_or.mandates.verify.cpp:58
+ //expected-error-re@*:* {{{{(static_assert|static assertion)}} failed {{.*}}value_type has to be move constructible}}
+ //expected-error-re@*:* {{{{call to deleted constructor of}} {{.*}}}}
+ }
----------------
Is the deleted constructor not on one of the user-provided types?
================
Comment at: libcxx/test/libcxx/utilities/expected/expected.expected/value_or.mandates.verify.cpp:65
+ std::expected<NotConvertibleFromInt, int> f1{std::in_place};
+ std::move(f1).value_or(5);
+ //expected-error-re@*:* {{{{(static_assert|static assertion)}} failed {{.*}}argument has to be convertible to value_type}}
----------------
How do we know any of these diagnostics are triggered by the code above them? You need to add a check that at least some diagnostic is emitted from this line.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124516/new/
https://reviews.llvm.org/D124516
More information about the libcxx-commits
mailing list