[libcxx-commits] [PATCH] D124516: [libc++] Implement `std::expected` P0323R12
Hui via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 25 09:41:45 PST 2022
huixie90 added inline comments.
================
Comment at: libcxx/include/__expected/expected.h:863
+
+ _LIBCPP_HIDE_FROM_ABI friend constexpr void swap(expected& __x, expected& __y) //
+ noexcept(noexcept(__x.swap(__y))) {
----------------
ldionne wrote:
> Please make sure you have tests that check that this is "equivalent to" the member swap, i.e. that the same constraints apply. This should be SFINAE friendly if the member swap can't be used, basically.
`noexcept` does not seem to do SFINAE here. I need to constrain it with `requires`
https://godbolt.org/z/E15jK4Ter
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