
On Thu, Nov 17, 2011 at 1:37 AM, Gottlob Frege <gottlobfrege@gmail.com> wrote:
Yep. The tradeoff is int func(temp_ptr<Foo> & foo)
not a big deal maybe, but it might be if my audience already is uncomfortable with references vs pointers vs smart-ptrs (ie ex-java). Throw a const or two in there and heads explode. Maybe the whole idea is a non-starter. But I do wonder what code with all smart-ptrs would look like. Of course if I had to templatize all my, say, image processing, because the pixel could be a temp_ptr<Pixel>, some_other_ptr<Pixel>,... instead of just Pixel *, that might be annoying...
Tony
To clarify, I want to see if it is possible to reasonably avoid pointers (and references), since they don't specify their lifetime contract. So I'd prefer not to have to pass the wrappers as pointers or references. :-) Tony