Update status for std::optional LWG issues and fix an optional SFINAE bug
llvm-svn: 284323
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 015fcffd57fb71fa29d307ac54b8626c8088b856
diff --git a/include/optional b/include/optional
index 46252c7..c64aa8f 100644
--- a/include/optional
+++ b/include/optional
@@ -681,12 +681,14 @@
// LWG2756
template <class _Up = value_type,
class = enable_if_t
- <
- !is_same_v<_Up, optional> &&
- !(is_same_v<_Up, value_type> && is_scalar_v<value_type>) &&
- is_constructible_v<value_type, _Up> &&
- is_assignable_v<value_type&, _Up>
- >
+ <__lazy_and<
+ integral_constant<bool,
+ !is_same_v<decay_t<_Up>, optional> &&
+ !(is_same_v<_Up, value_type> && is_scalar_v<value_type>)
+ >,
+ is_constructible<value_type, _Up>,
+ is_assignable<value_type&, _Up>
+ >::value>
>
_LIBCPP_INLINE_VISIBILITY
optional&