dimanche 6 septembre 2020

Why universal reference have to use template for the member function instead of class?

For example: This is NOT universal reference:

template<typename T>
class C {
  public:
    void gogo(T&& c);
};

But this is:

template<typename A>
class C {
  public:
    template<typename B>
    void gogo(B&& par);
}

Aucun commentaire:

Enregistrer un commentaire