I saw code like that.
What this & means and what is the official name of this kind of methods?
&
struct S{ int get() const &{ return 5; } }; int main(){ S s; return s.get(); }
Aucun commentaire:
Enregistrer un commentaire