[libcxx-commits] [PATCH] D155701: [libc++][expected] Implement LWG3836
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 20 10:09:48 PDT 2023
Mordante added a comment.
Does this have test for all changes paragraphs in the LWG issue?
================
Comment at: libcxx/include/__expected/expected.h:181
+ _Not<is_convertible<const expected<_Up, _OtherErr>&, _Tp>>,
+ _Not<is_convertible<const expected<_Up, _OtherErr>&&, _Tp>> > >,
+
----------------
This was needed for C++03.
================
Comment at: libcxx/include/__expected/expected.h:230
+ !__is_std_unexpected<remove_cvref_t<_Up>>::value && is_constructible_v<_Tp, _Up> &&
+ // LWG3836
+ (!is_same_v<remove_cv_t<_Tp>, bool> || !__is_std_expected<remove_cvref_t<_Up>>::value))
----------------
We typically don't mention LWG numbers in the code. We use them in the tests.
================
Comment at: libcxx/include/optional:735
+ _IsNotSame<__remove_cvref_t<_Up>, optional>::value &&
+ // LWG3836
+ (!is_same_v<remove_cv_t<_Tp>, bool> || !__is_std_optional<__remove_cvref_t<_Up>>::value),
----------------
likewise
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155701/new/
https://reviews.llvm.org/D155701
More information about the libcxx-commits
mailing list