Subject: Re: [boost] temp_ptr<> - preventing use as a member
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-11-13 20:52:00
on Sun Nov 13 2011, Gottlob Frege <gottlobfrege-AT-gmail.com> wrote:
> The only thing, I think, that I can't prevent, is construction of a
> new wrapper struct that has a temp_ptr as a member (which is copy
> constructed in wrapper's constructor). Can anyone think of a way to
> prevent that?
I'm pretty sure there's no way to do that.
> I think anyone that goes out of their way to make a wrapper struct
> gets what they deserve, so I don't really *need* to prevent all bad
> uses. But I can aslo imagine someone just using it improperly inside
> their class due to misunderstanding or whatever.
> And thoughts on the goal of specific smart pointers for all occasions?
Sounds interesting; I'd like to know how it turns out for you in
-- Dave Abrahams BoostPro Computing http://www.boostpro.com