From 0ca8c0895c6034615593c295dd955f29b25bf3d4 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Fri, 18 May 2018 21:01:04 +0000 Subject: Implement deduction guides for ; Reviewed as https://reviews.llvm.org/D46964 llvm-svn: 332768 --- libcxx/include/array | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'libcxx/include') diff --git a/libcxx/include/array b/libcxx/include/array index fdb1f9dae53..1e6a650198b 100644 --- a/libcxx/include/array +++ b/libcxx/include/array @@ -72,6 +72,9 @@ struct array const T* data() const noexcept; }; + template + array(T, U...) -> array; + template bool operator==(const array& x, const array& y); template @@ -86,7 +89,7 @@ template bool operator>=(const array& x, const array& y); template - void swap(array& x, array& y) noexcept(noexcept(x.swap(y))); + void swap(array& x, array& y) noexcept(noexcept(x.swap(y))); // C++17 template class tuple_size; template class tuple_element; @@ -354,6 +357,14 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> }; +#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +template && ...), void>::type + > +array(_Tp, _Args...) + -> array<_Tp, 1 + sizeof...(_Args)>; +#endif + template inline _LIBCPP_INLINE_VISIBILITY bool -- cgit v1.2.3