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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user