Add deduction guides for optional

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333251 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2018-05-25 02:08:49 +00:00
parent 7e4ede49d4
commit 2fac2d790f
3 changed files with 91 additions and 0 deletions

View File

@@ -139,6 +139,10 @@ namespace std {
private:
T *val; // exposition only
};
template<class T>
optional(T) -> optional<T>;
} // namespace std
*/
@@ -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