I did not ask what to do to compile it. I knew that 54L would do. The problem is that in the example I explicitely specify the template parameter as long* so there is no reason for the compiler to try and guess T from the type of the function argument. There is something wrong here.