Avoid having to prefix usage of templated method with the template keyword
02:39 07 Jan 2025

I have a structure like this

template
class Foo {
  template
  void bar();
}

How can I avoid having to prefix every call to bar on an instance of Foo with template to suppress the missing 'template' keyword prior to dependent template name error?

template 
void hi(Foo& foo) {
  foo.template bar(); // avoid this, its ugly
}
c++ templates