|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-23 21:18:59
Hmm. Given a choice I would pick KIU (keep it useful) over KISS.
My $.02,
Dave
----- Original Message -----
From: "Bill Klein" <bill_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, March 23, 2001 10:13 AM
Subject: Re: [boost] swap() for scoped_ptr/array
> > > Just wanted to know what the reason was for leaving out a swap()
> > > for scoped_ptr and scoped_array (it's included in the shared
> > > variety).
>
> Beman wrote:
> > Scoped_ptr is a KISS class - you use it when you want a very simple
> > solution, but use something else (shared_ptr, auto_ptr) if you
> > needs are greater.
> >
> > Did you have a specific problem you were trying to solve, or was it
> > a general question?
>
> I have a class that has member of type scoped_array<> to handle some
> memory I allocate... The crux of the situation is that I'd like to
> implement a non-throwing swap() for my class (for other reasons), and
> to do this, the scoped_array<> would need a swap(). shared_array is
> overkill in this situation, but of course I can roll my own that
> does what I need... Just thought this might be a common desire,
> although I do understand the drive to keep it as simple as possible.
>
>
> To unsubscribe, send email to: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk