18419fa3af97208eb00f0cd6c62354ce4ff986677Douglas Gregor//-*- C++ -*-
28419fa3af97208eb00f0cd6c62354ce4ff986677Douglas Gregor
38419fa3af97208eb00f0cd6c62354ce4ff986677Douglas Gregor// Intended to exercise all syntactic parts of the C++ language that
48419fa3af97208eb00f0cd6c62354ce4ff986677Douglas Gregor// aren't part of C.
58419fa3af97208eb00f0cd6c62354ce4ff986677Douglas Gregor
68419fa3af97208eb00f0cd6c62354ce4ff986677Douglas Gregornamespace std {
78419fa3af97208eb00f0cd6c62354ce4ff986677Douglas Gregor  namespace debug {
88419fa3af97208eb00f0cd6c62354ce4ff986677Douglas Gregor  }
98419fa3af97208eb00f0cd6c62354ce4ff986677Douglas Gregor}
108419fa3af97208eb00f0cd6c62354ce4ff986677Douglas Gregor
118419fa3af97208eb00f0cd6c62354ce4ff986677Douglas Gregorusing namespace std::debug;
128419fa3af97208eb00f0cd6c62354ce4ff986677Douglas Gregorusing namespace std;
136c9c94053132e5ca0655124b70f1c386a332e71dDouglas Gregor
146c9c94053132e5ca0655124b70f1c386a332e71dDouglas Gregornamespace safestl = ::std::debug;
1559e63570359b8adb9eb257759fe766d7aac1995aDouglas Gregor
1659e63570359b8adb9eb257759fe766d7aac1995aDouglas Gregorclass Base1 {
1759e63570359b8adb9eb257759fe766d7aac1995aDouglas Gregor};
1859e63570359b8adb9eb257759fe766d7aac1995aDouglas Gregor
1959e63570359b8adb9eb257759fe766d7aac1995aDouglas Gregorclass Base2 { };
2059e63570359b8adb9eb257759fe766d7aac1995aDouglas Gregor
2159e63570359b8adb9eb257759fe766d7aac1995aDouglas Gregorclass Derived1 : Base1, virtual public Base2 { };
22fb7b36327c4cd14c9454e0e9c26f8c44ba8207c0Peter Collingbourne
23fb7b36327c4cd14c9454e0e9c26f8c44ba8207c0Peter Collingbourne/* Template classes, template functions */
24fb7b36327c4cd14c9454e0e9c26f8c44ba8207c0Peter Collingbourneenum E1 { EC1 };
25fb7b36327c4cd14c9454e0e9c26f8c44ba8207c0Peter Collingbournetemplate <E1 v> class C1 {};
26fb7b36327c4cd14c9454e0e9c26f8c44ba8207c0Peter Collingbournetemplate <E1 v> C1<v> f1() { return C1<v>(); }
27fb7b36327c4cd14c9454e0e9c26f8c44ba8207c0Peter Collingbournevoid f2() { f1<EC1>(); }
28