workaround PR 28385 in __find_exactly_one_checked
Fixes #35578.
Differential Revision: D41048
llvm-svn: 320500
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 00c872f353905e0667bb16d3fae3451ac5ce453e
diff --git a/include/tuple b/include/tuple
index 788fd75..5e32b6d 100644
--- a/include/tuple
+++ b/include/tuple
@@ -1012,10 +1012,10 @@
template <class _T1, class ..._Args>
struct __find_exactly_one_checked {
- static constexpr bool __matches[] = {is_same<_T1, _Args>::value...};
+ static constexpr bool __matches[sizeof...(_Args)] = {is_same<_T1, _Args>::value...};
static constexpr size_t value = __find_detail::__find_idx(0, __matches);
- static_assert (value != __not_found, "type not found in type list" );
- static_assert(value != __ambiguous,"type occurs more than once in type list");
+ static_assert(value != __not_found, "type not found in type list" );
+ static_assert(value != __ambiguous, "type occurs more than once in type list");
};
template <class _T1>