while going through some of the mili source code I came across a struct declared like this:
template <class T, class Pre, class Pos>
struct PrePosCaller<T*, Pre, Pos>
(from here)
The part I’m unfamiliar with is <T*, Pre, Pos>. I understand what the code does and its purpose in this context but I would like to know where it is documented so I can learn/understand it a bit more.
That is a template specialization. In particular a partial specialization.
Somewhere in the code there is a template declared as:
or something similar. Then they are providing an specialization of that template for the cases where the first argument is a pointer type. That is, this is a template definition for
PrePosCallerwhen the first argument of the template is a pointer.