Douglas Gregor | 3cf8131 | 2009-11-03 23:16:33 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
| 2 | |
| 3 | template<typename T> |
| 4 | struct A { |
| 5 | template<typename U> A<T> operator+(U); |
| 6 | }; |
| 7 | |
| 8 | template<int Value, typename T> bool operator==(A<T>, A<T>); |
| 9 | |
| 10 | template<> bool operator==<0>(A<int>, A<int>); |
| 11 | |
| 12 | bool test_qualified_id(A<int> ai) { |
| 13 | return ::operator==<0, int>(ai, ai); |
| 14 | } |
| 15 | |
| 16 | void test_op(A<int> a, int i) { |
| 17 | const A<int> &air = a.operator+<int>(i); |
| 18 | } |
| 19 | |
| 20 | template<typename T> |
| 21 | void test_op_template(A<T> at, T x) { |
| 22 | // FIXME: Not yet implemented. |
| 23 | // const A<T> &atr = at.template operator+<T>(x); |
| 24 | // const A<T> &atr2 = at.A<T>::template operator+<T>(x); |
| 25 | } |
| 26 | |
| 27 | template void test_op_template<float>(A<float>, float); |