zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.8k stars 2.36k forks source link

Replace insert with emplace #4712

Closed githejie closed 3 months ago

githejie commented 4 months ago

Perhaps some compilers can optimize insert at compile time, but replacing insert with emplace can avoid unnecessary copy construction or move construction at the C++ syntax level.