“template” vs “template” without brackets – what’s the difference?

template <> void foo<int>(int& t); declares a specialization of the template, with potentially different body.

template void foo<int>(int& t); causes an explicit instantiation of the template, but doesn’t introduce a specialization. It just forces the instantiation of the template for a specific type.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)