Template instantiation via return type does not work in c++, so you have to specify it explicitly as Scott noted