diff options
Diffstat (limited to 'clang/test/SemaTemplate/deduction.cpp')
| -rw-r--r-- | clang/test/SemaTemplate/deduction.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/test/SemaTemplate/deduction.cpp b/clang/test/SemaTemplate/deduction.cpp index 216b8347be7..8ac65aacd5b 100644 --- a/clang/test/SemaTemplate/deduction.cpp +++ b/clang/test/SemaTemplate/deduction.cpp @@ -526,13 +526,17 @@ namespace dependent_list_deduction { static_assert(is_same<X<T...>, X<int, char, char>>::value, ""); static_assert(is_same<Y<V...>, Y<3, 2, 4>>::value, ""); } - template<typename ...T, T ...V> void g(const T (&...p)[V]) { // expected-note {{deduced incomplete pack}} + template<typename ...T, T ...V> void g(const T (&...p)[V]) { static_assert(is_same<X<T...>, X<int, decltype(sizeof(0))>>::value, ""); static_assert(is_same<Y<V...>, Y<2, 3>>::value, ""); } void h() { f({1, 2, 3}, {'a', 'b'}, "foo"); - // FIXME: Deduction in this case should succeed. - g({1, 2}, {{}, {}, {}}); // expected-error {{no match}} + g({1, 2}, {{}, {}, {}}); +#if __cplusplus <= 201402 + // expected-error@-2 {{no match}} + // expected-note@-9 {{deduced incomplete pack}} + // We deduce V$1 = (size_t)3, which in C++1z also deduces T$1 = size_t. +#endif } } |

