diff options
author | 2019-02-04 16:55:44 +0000 | |
---|---|---|
committer | 2019-02-04 16:55:44 +0000 | |
commit | 76c648e7a477ffb2a882ad5ffe523269bd9a3f6a (patch) | |
tree | 29d319d598650bab04e4f58e5e8769567e33091e /lib/libcxx/include/optional | |
parent | Import libc++abi 7.0.1. (diff) | |
download | wireguard-openbsd-76c648e7a477ffb2a882ad5ffe523269bd9a3f6a.tar.xz wireguard-openbsd-76c648e7a477ffb2a882ad5ffe523269bd9a3f6a.zip |
Import libc++ 7.0.1.
Diffstat (limited to 'lib/libcxx/include/optional')
-rw-r--r-- | lib/libcxx/include/optional | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/libcxx/include/optional b/lib/libcxx/include/optional index 88fd6b5aba2..a76f8d18976 100644 --- a/lib/libcxx/include/optional +++ b/lib/libcxx/include/optional @@ -139,6 +139,10 @@ namespace std { private: T *val; // exposition only }; + +template<class T> + optional(T) -> optional<T>; + } // namespace std */ @@ -612,8 +616,8 @@ private: }; template <class _Up> using _CheckOptionalArgsCtor = conditional_t< - !is_same_v<decay_t<_Up>, in_place_t> && - !is_same_v<decay_t<_Up>, optional>, + !is_same_v<__uncvref_t<_Up>, in_place_t> && + !is_same_v<__uncvref_t<_Up>, optional>, _CheckOptionalArgsConstructor, __check_tuple_constructor_fail >; @@ -761,7 +765,7 @@ public: class = enable_if_t <__lazy_and< integral_constant<bool, - !is_same_v<decay_t<_Up>, optional> && + !is_same_v<__uncvref_t<_Up>, optional> && !(is_same_v<_Up, value_type> && is_scalar_v<value_type>) >, is_constructible<value_type, _Up>, @@ -1003,6 +1007,11 @@ private: } }; +#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +template<class T> + optional(T) -> optional<T>; +#endif + // Comparisons between optionals template <class _Tp, class _Up> _LIBCPP_INLINE_VISIBILITY constexpr |