by cpeterso · 15y ago · 0 comments
Exception-safe RAII is pretty much an all-or-nothing affair.
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.
You need to prove that, I think it's a bogus claim. There is no reason why good template code should be any larger than its hand-written equivalent. Any decent optimizing compiler will take care of the rest.