If you're doing something more complex, you might need metashell. See http://metashell.org/manual/how_to/index.html#see-what-templ.... But you have to really, deeply, love C++ to get much out of it.
templar : https://github.com/schulmar/Templar/wiki/HowTo
metashell gui front end : https://kandi.openweaver.com/c++/RangelReale/msgui
main page: http://dsw.users.sonic.net/oink/index.html
github repo: https://github.com/dsw/oink-stack/
Trying to verify that I found this tool called Templator that apparently does it in a nice graphical way: https://www.cevelop.com/#templator
The license is restrictive but you can download it for free: https://www.cevelop.com/license/
Seems thee's an emacs "expand the C++ template" concept: demystifycpp https://github.com/chriskmanx/demystifycpp
etbrain's ide package(s) support gcc cpp directives, so in theory should be able to expand a c++ template in cpp fashion in similar manner as regular code blocks. https://www.jetbrains.com