This is in reference to the first formal parameter in this question.
NOTE:
T
andarrsize
are passed as template parameters here.
T (&arr)[arrsize]
appears to be some sort of cast, but to what I am not sure. &arr
is not a typename, it's just a formal parameter name with a reference symbol next to it. Why wouldn't one just put T* arr[]
? Furthermore, I didn't think casting in a formal parameter list, or coercion, was possible in a language that implements function overloading. (i.e., introduces ambiguity in function calls). I suppose template functions introduce useful ambiguity, so is casting allowed in this context -- assuming two template functions don't have the same signature, barring the casting?
When this template is instantiated, what type does this argument become? Is it a pointer or a reference to a static array; simply T*
; or something else?