|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-07-24 06:02:05
From: "René Dalby Carlsen" <yg-boost-users_at_[hidden]>
> > > Is there any easy way to get a thread safe edition of the shared_ptr
> > > (BOOST_HAS_THREADS) and a "non" thread safe edition
> > (BOOST_DISABLE_THREADS)
> > > inside the same project?
> >
> > No, sorry.
>
> Any plans for making it possible in future releases or are there some
design
> reasons for not making it possible?
One of shared_ptr's design goals is to provide a common interface for
library designers to use. This typically means that there must be one single
shared_ptr; if there were two, library A could choose shared_ptr_1 for its
interfaces, library B could choose shared_ptr_2, and they wouldn't talk to
each other.
Of course, a single smart pointer cannot do everything well. It was (is)
expected that a policy-based smart pointer design (framework) - considered
"imminent" at one time - could fill the gaps that shared_ptr cannot.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net