It's not related to RVO. If you have a local variable that is returned and meets a certain set of requirements, it's implicitly moved when you return it. If RVO kicks in, then the variable won't even be moved. It will be constructed once and moved and copied a total of 0 times.