dimanche 18 juillet 2021

What does it mean, using in C++ code "template" keyword as attribute of some object? [duplicate]

There is such peace of code in chromium repo

  template <typename SupplementType>
  static SupplementType* From(const Supplementable<T>& supplementable) {
    return supplementable.template RequireSupplement<SupplementType>();
  }

I'd like to understand what happens here, but I have absolutely no idea about that. I mean line:

return supplementable.template RequireSupplement<SupplementType>();

Please, give some links to features of C++ which are used here.

Aucun commentaire:

Enregistrer un commentaire