Eli Friedman | 59c0437 | 2009-07-29 19:44:27 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
| 2 | |
| 3 | // PR4621 |
| 4 | class A1 { |
| 5 | A1(int x) {} |
| 6 | }; |
| 7 | template<class C> class B1 : public A1 { |
| 8 | B1(C x) : A1(x.x) {} |
| 9 | }; |
| 10 | class A2 { A2(int x, int y); }; |
| 11 | template <class C> class B2 { |
| 12 | A2 x; |
| 13 | B2(C x) : x(x.x, x.y) {} |
| 14 | }; |
| 15 | template <class C> class B3 { |
| 16 | C x; |
| 17 | B3() : x(1,2) {} |
| 18 | }; |
| 19 | |
| 20 | // PR4627 |
| 21 | template<typename _Container> class insert_iterator { |
| 22 | _Container* container; |
| 23 | insert_iterator(_Container& __x) : container(&__x) {} |
| 24 | }; |
| 25 | |
Fariborz Jahanian | 77a2b4f | 2009-08-24 17:19:23 +0000 | [diff] [blame^] | 26 | // PR4763 |
| 27 | template<typename T> struct s0 {}; |
| 28 | template<typename T> struct s0_traits {}; |
| 29 | template<typename T> struct s1 : s0<typename s0_traits<T>::t0> { |
| 30 | s1() {} |
| 31 | }; |
| 32 | |