The cppreference says that
When the initializer is a prvalue, the move constructor call is often optimized out (until C++17) / never made (since C++17).
I have two questions:
1) Does this mean that construction with literals (e.g. integer 10
) will never move construct?
2) What's the reasoning for this rule?
Aucun commentaire:
Enregistrer un commentaire