My code is as follows. Why () makes RVO fail?
A fn() { A a{}; return (a); // move constructor of class A works return a; // RVO works } int main() { A a = fn(); return 0; }
Aucun commentaire:
Enregistrer un commentaire