jamboree / bustache

C++20 implementation of {{ mustache }}
82 stars 10 forks source link

Bustache RVO #19

Closed carolinebeltran closed 4 years ago

carolinebeltran commented 4 years ago

Is it safe to assume that Bustache objects are returned via RVO just like other STD container are?

bustache::array getData() { bustache::array array; ... return array; }

Thank you in advance!

jamboree commented 4 years ago

RVO is a compiler thing I don't think we can do anything to interfere that. If your compiler guarantee RVO, than it should just does it as for other STD containers. BTW, bustache::array is just a typedef of std::vector.