1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
2 | |
3 | template<typename T> |
4 | struct X { |
5 | void mf1(T); |
6 | template<typename U> void mf2(T, U); // expected-note{{previous}} |
7 | }; |
8 | |
9 | template<> |
10 | void X<int>::mf1(int i = 17) // expected-error{{default}} |
11 | { |
12 | } |
13 | |
14 | template<> template<> |
15 | void X<int>::mf2(int, int = 17) // expected-error{{default}} |
16 | { } |
17 | |
18 | template<> template<typename U> |
19 | void X<int>::mf2(int, U = U()) // expected-error{{default}} |
20 | { |
21 | } |
22 | |
23 | template<> |
24 | struct X<float> { |
25 | void mf1(float); |
26 | }; |
27 | |
28 | void X<float>::mf1(float = 3.14f) // okay |
29 | { |
30 | } |
31 | |