Daily Shaarli

All links of one day in a single page.

May 1, 2015

Template Code Bloat Revisited: A Smaller make_shared | EmptyCrate

So what does this have to do with make_shared? An std::shared_ptr is a relatively complex beast that has to do atomic reference counting and efficient destruction dispatching and things like that. As such, a relatively large amount of code is instantiated for each std::shared_ptr<> type.