fix nested C++ template syntax