#include #include #include #define MACRO(T) f() class MyClass { public: std::map < int, bool > someData; std::map < int, std::list < bool > > otherData; }; void foo() { List < byte >bob = new List (); } A foo; A bar; A baz; A > bay; void asd(void) { A foo; A bar; A baz; A > bay; if (a < b && b > c) { a = b < c > 0; } if (a < bar() > c) { } a < up_lim() ? do_hi() : do_low; a[ ac] = d; } template class MyClass { } template class MyClass { } template class MyClass : myvar(0), myvar2(0) { } template class MyClass : myvar(0), myvar2(0) { } static int max_value() { return (std :: numeric_limits :: max ) (); } template < class Config_ > priority_queue < Config_ > :: ~ priority_queue () { } template T test(T a) { return a; } int main() { int k; int j; h g; k=test (j); return 0; } template class ConcreteStorageClass> class RotationMatrix : public StaticBaseMatrix { public: RotationMatrix() : StaticBaseMatrix() { // do some initialization } void assign(const OtherClass& other) { // do something } }; int main() { MyClass foo; } template< typename CharT, int N, typename Traits > inline std::basic_ostream& FWStreamOut(std::basic_ostream &os, const W::S &s) { return operator<< > ( os, s ); } struct foo { type1 < int & > bar; }; struct foo { type1 < int const > bar; }; template void f(); template void g() { f(); f< i >(); f(); f(); } void h() { g<42>(); } #include std::vector A(2); std::vector B; std::vectorC(2); std::vectorD; templatestruct X{templatevoid operator()(U);}; templateclass Y{templatevoid f(V);}; void (* foobar)(void) = NULL; std::vector functions; #define MACRO( a ) a template < typename = int > class X ; MACRO ( void f ( X < > & x ) ) ; void g ( X < > & x ) ; #include typedef std::vector > Table; // OK typedef std::vector> Flags; // Error void func(List= default_val1); void func(List>= default_val2); BLAH<(3.14 >= 42)> blah; bool X = j<3>>1; void foo() { A<(X>Y)> a; a = static_cast>(ld); } template class X { /* ... */ }; X< 1>2 > x1; // Syntax error. X<(1>2)> x2; // Okay. template class Y { /* ... */ }; Y> x3; // Okay, same as "Y > x3;". Y>1)>> x4; template int myFunc1(typename T::Subtype val); int myFunc2(T::Subtype val);