In https://github.com/pytorch/pytorch/blob/dc2cdeae68a6ffc6be24a9dee75ccea745936657/aten/src/ATen/native/quantized/cpu/qupsample_nearest2d.cpp#L40, we see typename
used in the function call to the template function reinterpret_cast
.
I've never seen a function call where the typename
keyword was used.
I tried this with a simple code but the program doesn't compile:
template <typename T>
void func(T i) {
}
int main(int argc, char const *argv[])
{
func<typename int> func(1);
}
test.cpp:19:17: error: expected a qualified name after 'typename'
func<typename int> func(1);