Working template magic for void function.