Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2020-06-02 14:32:52


Alexander Grund wrote:

> Not sure if that really proves the point. I think you need to compare a
> result<X> function to a function returning X directly. Like so:
> https://godbolt.org/z/JFmn_j
>
> And for that there is a difference: There are 4 main memory accesses in
> the result<X> function and none in the "regular" one.

That's not because of NRVO, it's because X fits in registers and result<X>
doesn't.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk