'template<class G,class A,class T>' in the comment line seems to be a typo