const
does not prevent (N)RVO, youhou.
Const, Move and RVO
by Bartlomiej Filipek
From the article:
C++ is a surprising language. Sometimes simple things are not that simple in practice. Last time I argued that in function bodies const should be used most of the time. But two cases were missed: when moving and when returning a value.
Does const influence move and RVO?
Add a Comment
Comments are closed.