Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2748: [any] implement reset for direct constructing (adapt to noncopyable)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-09-13 19:30:37
#2748: [any] implement reset for direct constructing (adapt to noncopyable)
-------------------------------------+--------------------------------------
Reporter: nowake@⦠| Owner: nasonov
Type: Patches | Status: closed
Milestone: Boost 1.39.0 | Component: any
Version: Boost 1.38.0 | Severity: Optimization
Resolution: wontfix | Keywords: any noncopyable
-------------------------------------+--------------------------------------
Changes (by anonymous):
* status: new => closed
* resolution: => wontfix
Comment:
I think that a better and simpler approach for storing noncopyable objects
is any_cast transparency to shared pointers. For instance:
{{{
any p(shared_ptr<X>(new X));
any_cast<X&>(p); // doesn't throw
}}}
Alex
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2748#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC