Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Douglas Gregor | fd2300e | 2009-10-29 17:56:10 +0000 | [diff] [blame] | 2 | // PR5336 |
| 3 | template<typename FromCl> |
| 4 | struct isa_impl_cl { |
| 5 | template<class ToCl> |
| 6 | static void isa(const FromCl &Val) { } |
| 7 | }; |
| 8 | |
| 9 | template<class X, class Y> |
| 10 | void isa(const Y &Val) { return isa_impl_cl<Y>::template isa<X>(Val); } |
| 11 | |
| 12 | class Value; |
| 13 | void f0(const Value &Val) { isa<Value>(Val); } |
Douglas Gregor | 8a4386b | 2009-11-04 23:20:05 +0000 | [diff] [blame] | 14 | |
| 15 | // Implicit template-ids. |
| 16 | template<typename T> |
| 17 | struct X0 { |
| 18 | template<typename U> |
| 19 | void f1(); |
| 20 | |
| 21 | template<typename U> |
| 22 | void f2(U) { |
| 23 | f1<U>(); |
| 24 | } |
| 25 | }; |
| 26 | |
| 27 | void test_X0_int(X0<int> xi, float f) { |
| 28 | xi.f2(f); |
| 29 | } |