Hacker News new | ask | show | jobs
by bigcheesegs 2334 days ago
It's the overhead VS. passing a raw pointer. The itanium ABI says that std::unique_ptr has to be passed by address due to its special member functions (the ABI doesn't know if it stores a pointer to itself).

Compilers have an attribute to remove this overhead, but it's an ABI break to do it.

1 comments

Thanks, I always assumed that a unique ptr was identical to a regular pointer under the hood.