Eli Friedman | 924d5c9 | 2012-11-14 23:57:08 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only %s -std=c++98 2>&1 | FileCheck %s |
| 2 | |
| 3 | namespace PR14342 { |
| 4 | template<typename T, char a> struct X {}; |
| 5 | X<int, 1> x = X<long, 257>(); |
| 6 | // CHECK: error: no viable conversion from 'X<long, [...]>' to 'X<int, [...]>' |
Douglas Gregor | 7f99d5c | 2013-03-14 20:44:43 +0000 | [diff] [blame] | 7 | } |
| 8 | |
| 9 | namespace PR15513 { |
| 10 | template <int x, int y = x+1> |
| 11 | class A {}; |
| 12 | |
| 13 | void foo(A<0> &M) { |
| 14 | // CHECK: no viable conversion from 'A<[...], (default) x + 1>' to 'A<[...], 0>' |
| 15 | A<0, 0> N = M; |
| 16 | } |
| 17 | } |