[libcxx-commits] [PATCH] D124516: [libc++] Implement `std::expected` P0323R12

Hui via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Dec 3 09:44:13 PST 2022


huixie90 added inline comments.


================
Comment at: libcxx/test/std/utilities/expected/expected.expected/assign/emplace.pass.cpp:51
+
+constexpr bool test() {
+  // has_value
----------------
ldionne wrote:
> Do we not need exceptions-related tests here to make sure we perform operations in the right order?
> 
> Please go through all the operations of both the void and the non-void specializations. This is a very high bar, but I think it's worth doing it.
turns out that the `emplace` function requires `is_nothrow_constructible_v` so we don't need a runtime tests. (there are compile time tests above to test that if it can throw , there will be no emplace function)


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