r/cpp • • Sep 20 '26

Magic statics vs. std::call_once

https://devblogs.microsoft.com/oldnewthing/20260916-00/?p=112703
73 Upvotes

11 comments sorted by

View all comments

Show parent comment

6

u/tokemura Sep 20 '26

More details in Scott Meyers - Effective Modern C++ Item 41: Consider pass by value for copyable parameters that are cheap to move and always copied.