Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/signals2/slot_base.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
27 namespace signals2 | 27 namespace signals2 |
28 { | 28 { |
29 namespace detail | 29 namespace detail |
30 { | 30 { |
31 class tracked_objects_visitor; | 31 class tracked_objects_visitor; |
32 class trackable_pointee; | |
32 | 33 |
33 typedef boost::variant<boost::weak_ptr<void>, detail::foreign_void_weak_ptr > void_weak_ptr_variant; | 34 typedef boost::variant<boost::weak_ptr<trackable_pointee>, boost::weak_ptr<void>, detail::foreign_void_weak_ptr > void_weak_ptr_variant; |
34 typedef boost::variant<boost::shared_ptr<void>, detail::foreign_void_shared_ptr > void_shared_ptr_variant; | 35 typedef boost::variant<boost::shared_ptr<void>, detail::foreign_void_shared_ptr > void_shared_ptr_variant; |
35 class lock_weak_ptr_visitor | 36 class lock_weak_ptr_visitor |
36 { | 37 { |
37 public: | 38 public: |
38 typedef void_shared_ptr_variant result_type; | 39 typedef void_shared_ptr_variant result_type; |
39 template<typename WeakPtr> | 40 template<typename WeakPtr> |
40 result_type operator()(const WeakPtr &wp) const | 41 result_type operator()(const WeakPtr &wp) const |
41 { | 42 { |
42 return wp.lock(); | 43 return wp.lock(); |
44 } | |
45 // overload to prevent incrementing use count of shared_ptr associated | |
46 // with signals2::trackable objects | |
47 result_type operator()(const weak_ptr<trackable_pointee> &) const | |
48 { | |
49 return boost::shared_ptr<void>(); | |
43 } | 50 } |
44 }; | 51 }; |
45 class expired_weak_ptr_visitor | 52 class expired_weak_ptr_visitor |
46 { | 53 { |
47 public: | 54 public: |