context addable(type T) { T ?+?(T,T); }; type List(type T | addable(T) ) | addable(T) = struct { T data; List(T) *next; } *; typedef List(int) ListOfIntegers; ListOfIntegers li; int f( List(int) ((*g))(int) ); [int] h( * List(int) p ); // new declaration syntax struct(type T) S1; // forward definition struct(type T) S1 { T i; }; // actual definition struct(int) S1 v1, *p; // expansion and instantiation struct(type T)(int) S2 { T i; } v2; // actual definition, expansion and instantiation struct(type T)(int) { T i; } v2; // anonymous actual definition, expansion and instantiation struct( type T | addable(T) ) node { T data; struct(T) node *next; }; type List(type T) = struct(T) node *; List(int) my_list; type Complex | addable(Complex); int main() { (struct(int) node)my_list; } // Local Variables: // // tab-width: 4 // // End: //