#include #include #include #define MACRO(T) f() class MyClass { public: std::mapsomeData; std::map >otherData; }; void foo() { Listbob = new List(); } Afoo; Abar; Abaz; A >bay; void asd(void) { Afoo; Abar; Abaz; A >bay; if (a < b && b > c) { a = b < c > 0; } if (ac) { } a < up_lim() ? do_hi() : do_low; a[ ac] = d; } templateclass MyClass { } template class MyClass { } templateclass MyClass : myvar(0), myvar2(0) { } templateclass MyClass : myvar(0), myvar2(0) { } static int max_value() { return (std :: numeric_limits:: max )(); } template priority_queue :: ~priority_queue () { } template T test(T a) { return a; } int main() { int k,j; h g; k=test(j); return 0; } templateclass ConcreteStorageClass> class RotationMatrix : public StaticBaseMatrix { public: RotationMatrix() : StaticBaseMatrix() { // do some initialization } void assign(const OtherClass& other) { // do something } }; int main() { MyClassfoo; } template inline std::basic_ostream& FWStreamOut(std::basic_ostream& os, const W::S& s) { return operator<< >( os, s ); } struct foo { type1bar; }; struct foo { type1bar; }; templatevoid f(); templatevoid g() { f(); f(); f(); f(); } void h() { g<42>(); } #include std::vectorA(2); std::vectorB; std::vectorC(2); std::vectorD; templatestruct X { templatevoid operator()(U); }; templateclass Y { templatevoid f(V); }; void (* foobar)(void) = NULL; std::vectorfunctions; #define MACRO( a ) a templateclass 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); } templateclass X { /* ... */ }; X < 1 > 2 > x1; // Syntax error. X<(1 > 2)>x2; // Okay. templateclass Y { /* ... */ }; Y >x3; // Okay, same as "Y > x3;". Y> 1)> >x4; template int myFunc1(typename T::Subtype val); int myFunc2(T::Subtype val);