[libcxx] r320500 - workaround PR 28385 in __find_exactly_one_checked

Casey Carter via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 12 09:22:24 PST 2017


Author: caseycarter
Date: Tue Dec 12 09:22:24 2017
New Revision: 320500

URL: http://llvm.org/viewvc/llvm-project?rev=320500&view=rev
Log:
workaround PR 28385 in __find_exactly_one_checked

Fixes #35578.

Differential Revision: D41048

Modified:
    libcxx/trunk/include/tuple

Modified: libcxx/trunk/include/tuple
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/tuple?rev=320500&r1=320499&r2=320500&view=diff
==============================================================================
--- libcxx/trunk/include/tuple (original)
+++ libcxx/trunk/include/tuple Tue Dec 12 09:22:24 2017
@@ -1012,10 +1012,10 @@ constexpr size_t __find_idx(size_t __i,
 
 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>




More information about the cfe-commits mailing list