Hacker News new | ask | show | jobs
by johnny531 5580 days ago
Not sure what you mean with copy ctor bloat, but for your_flavor_of_smart_ptr, that's what the typedef keyword is for.

A common idiom I use is to typedef a class's preferred smart-pointer as ptr_t within the class namespace. Passing them around now looks like:

void some_function(my_class::ptr_t);

Exception safe, clear semantics, & no bloat.