|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51411 - in sandbox/thread_safe_signals/trunk: boost/signals2/detail libs/signals2/test
From: fmhess_at_[hidden]
Date: 2009-02-23 00:30:13
Author: fmhess
Date: 2009-02-23 00:30:12 EST (Mon, 23 Feb 2009)
New Revision: 51411
URL: http://svn.boost.org/trac/boost/changeset/51411
Log:
On second though, I don't like automatically tracking
weak_ptr<signals2::trackable> and weak_ptr<signals2::signal>.
Text files modified:
sandbox/thread_safe_signals/trunk/boost/signals2/detail/tracked_objects_visitor.hpp | 23 -----------------------
sandbox/thread_safe_signals/trunk/libs/signals2/test/trackable_test.cpp | 7 -------
2 files changed, 0 insertions(+), 30 deletions(-)
Modified: sandbox/thread_safe_signals/trunk/boost/signals2/detail/tracked_objects_visitor.hpp
==============================================================================
--- sandbox/thread_safe_signals/trunk/boost/signals2/detail/tracked_objects_visitor.hpp (original)
+++ sandbox/thread_safe_signals/trunk/boost/signals2/detail/tracked_objects_visitor.hpp 2009-02-23 00:30:12 EST (Mon, 23 Feb 2009)
@@ -37,11 +37,6 @@
{
m_visit_reference_wrapper(t, mpl::bool_<is_reference_wrapper<T>::value>());
}
- template<typename T>
- void operator()(const weak_ptr<T> & wp) const
- {
- m_visit_weak_ptr(wp, mpl::bool_<is_base_of<signals2::trackable, T>::value>());
- }
private:
template<typename T>
void m_visit_reference_wrapper(const reference_wrapper<T> &t, const mpl::bool_<true> &) const
@@ -88,24 +83,6 @@
slot_->_tracked_objects.push_back(trackable->get_shared_ptr());
}
void add_if_trackable(const void *trackable) const {}
- template<typename T>
- void m_visit_weak_ptr(const weak_ptr<T> &wp, const mpl::bool_<true> &) const
- {
- slot_->_tracked_objects.push_back(wp);
- }
- template<typename T>
- void m_visit_weak_ptr(const weak_ptr<T> &wp, const mpl::bool_<false> &) const
- {
- m_visit_weak_ptr_to_signal(wp, mpl::bool_<is_signal<T>::value>());
- }
- template<typename T>
- void m_visit_weak_ptr_to_signal(const weak_ptr<T> &wp, const mpl::bool_<true> &) const
- {
- slot_->_tracked_objects.push_back(wp);
- }
- template<typename T>
- void m_visit_weak_ptr_to_signal(const weak_ptr<T> &wp, const mpl::bool_<false> &) const
- {}
mutable slot_base * slot_;
};
Modified: sandbox/thread_safe_signals/trunk/libs/signals2/test/trackable_test.cpp
==============================================================================
--- sandbox/thread_safe_signals/trunk/libs/signals2/test/trackable_test.cpp (original)
+++ sandbox/thread_safe_signals/trunk/libs/signals2/test/trackable_test.cpp 2009-02-23 00:30:12 EST (Mon, 23 Feb 2009)
@@ -65,13 +65,6 @@
BOOST_CHECK(s1(5) == 5);
}
BOOST_CHECK(s1(5) == 0);
- // Test auto-disconnection of trackable in weak_ptr
- {
- boost::shared_ptr<short_lived> shorty(new short_lived);
- s1.connect(boost::bind<int>(swallow(), boost::weak_ptr<short_lived>(shorty), _1));
- BOOST_CHECK(s1(5) == 5);
- }
- BOOST_CHECK(s1(5) == 0);
// Test multiple arg slot constructor
{
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk