define templates outside of block scope

try to get it to compile with travis