Make template magic compile with GCC