Douglas Gregor | 8419fa3 | 2009-05-30 06:31:56 +0000 | [diff] [blame] | 1 | //-*- C++ -*- |
| 2 | |
| 3 | // Intended to exercise all syntactic parts of the C++ language that |
| 4 | // aren't part of C. |
| 5 | |
| 6 | namespace std { |
| 7 | namespace debug { |
| 8 | } |
| 9 | } |
| 10 | |
| 11 | using namespace std::debug; |
| 12 | using namespace std; |
Douglas Gregor | 6c9c940 | 2009-05-30 06:48:27 +0000 | [diff] [blame] | 13 | |
| 14 | namespace safestl = ::std::debug; |
Douglas Gregor | 59e6357 | 2009-05-30 06:58:37 +0000 | [diff] [blame] | 15 | |
| 16 | class Base1 { |
| 17 | }; |
| 18 | |
| 19 | class Base2 { }; |
| 20 | |
| 21 | class Derived1 : Base1, virtual public Base2 { }; |
Peter Collingbourne | fb7b363 | 2010-12-15 15:06:14 +0000 | [diff] [blame] | 22 | |
| 23 | /* Template classes, template functions */ |
| 24 | enum E1 { EC1 }; |
| 25 | template <E1 v> class C1 {}; |
| 26 | template <E1 v> C1<v> f1() { return C1<v>(); } |
| 27 | void f2() { f1<EC1>(); } |