[PATCH] D46964: Implement class deduction guides for `std::array`
Eric Fiselier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 18 13:34:10 PDT 2018
EricWF accepted this revision.
EricWF added inline comments.
This revision is now accepted and ready to land.
================
Comment at: include/array:75
+ template <class T, class... U>
+ array(T, U...) -> array<T, 1 + sizeof...(U)>;
----------------
Don't we normally comment `// C++17` or similar for new features in the synopsis?
================
Comment at: include/array:361
+#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES
+template<class _Tp, class... _Args,
+ class = typename enable_if<(is_same_v<_Tp, _Args> && ...), void>::type
----------------
The `is same` clause is a requirement, not a SFINAE constraint. Should this be a hard error? Should we really SFINAE it?
================
Comment at: test/std/containers/sequences/array/array.cons/deduct.fail.cpp:12
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// XFAIL: libcpp-no-deduction-guides
+
----------------
This should be `UNSUPPORTED`. We don't expect this test to ever pass without deduction guides.
================
Comment at: test/std/containers/sequences/array/array.cons/deduct.pass.cpp:12
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+// XFAIL: libcpp-no-deduction-guides
+
----------------
`UNSUPPORTED`
https://reviews.llvm.org/D46964
More information about the cfe-commits
mailing list