Re: [Boost-bugs] [Boost C++ Libraries] #810: support for weak_ptr binding

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #810: support for weak_ptr binding
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-12-11 22:00:10


#810: support for weak_ptr binding
-------------------------------+--------------------------
  Reporter: nobody | Owner: pdimov
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: smart_ptr
   Version: None | Severity: Optimization
Resolution: None | Keywords:
-------------------------------+--------------------------
Changes (by pdimov):

 * status: assigned => new


Old description:

> {{{
> Hello,
>
> recently i faced with problem - i was not able to pass weak_ptr to bind()
> function. I started to study why and found there is no support for this
> in boost.
>
> As result, me and my friend wrote "get_pointer" version
> which accepts weak_ptr.
>
> At actual call moment, implementation uses weak_ptr::lock() to get
> shared_ptr. If retrieved shared_ptr is invalid, then exception of type
> "disposed_exception" thrown.
>
> This code was tested on Windows XP SP2 with following compilers: VC6,
> VC7, VC7.1, VC8, g++ 3.2.3 (MinGW), g++ 3.4.4 (Cygwin).
>
> If you find this code is useful for someone else me, please add to boost
> (it's actually not a library, this is why i'm poosting it to "patches").
> You can find sources + test app in attachment.
>

> Thank you,
> Dmytro Gokun
> }}}

New description:

 {{{
 Hello,

 recently i faced with problem - i was not able to pass weak_ptr to bind()
 function. I started to study why and found there is no support for this in
 boost.

 As result, me and my friend wrote "get_pointer" version
 which accepts weak_ptr.

 At actual call moment, implementation uses weak_ptr::lock() to get
 shared_ptr. If retrieved shared_ptr is invalid, then exception of type
 "disposed_exception" thrown.

 This code was tested on Windows XP SP2 with following compilers: VC6, VC7,
 VC7.1, VC8, g++ 3.2.3 (MinGW), g++ 3.4.4 (Cygwin).

 If you find this code is useful for someone else me, please add to boost
 (it's actually not a library, this is why i'm poosting it to "patches").
 You can find sources + test app in attachment.


 Thank you,
 Dmytro Gokun
 }}}

--
-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/810#comment:6>
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:15 UTC