Skip to content

Templates

CD2 edited this page Feb 8, 2023 · 1 revision

Definition

You can use templates for classes and functions. Template arguments can only be types. The type name must end with _t.

&Class<foo_t>

{

*foo_t a; // Need * if definition is not known at the beginning

public ..f<_t>(_t x) _t

{

ret x;

}

}

&Class!char? af!int?(0);

Clone this wiki locally