I used push_back rather than emplace_back.
btw would there be any performance difference if I used emplace_back ?
Yes there is, you create one less temporary in some cases
Test it on gcc.goodbolt.org
Emplace_back is safer
Обсуждают сегодня