[Boost-bugs] [ boost-Patches-1633503 ] support for weak_ptr binding

Patches item #1633503, was opened at 2007-01-11 11:56 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=307586&aid=1633503&group_id=7586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: smart_ptr Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Peter Dimov (pdimov) Summary: support for weak_ptr binding Initial Comment: 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 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=307586&aid=1633503&group_id=7586 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Boost-bugs mailing list Boost-bugs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/boost-bugs
participants (1)
-
SourceForge.net