mardi 4 septembre 2018

C++ Reference to reference in function definition

Is any performance difference between

foo(std::vector<int> a);
foo2(std::vector<int>&& a);

When calling it like this:

foo({1,2,3});
foo2({1,2,3});

Or it depends of compiler, and it`s optimalization settings?

Aucun commentaire:

Enregistrer un commentaire