forked from pool/boost
This commit is contained in:
parent
c76cf89cd6
commit
7d66a2e017
@ -1,38 +0,0 @@
|
|||||||
Add a test for timer canceling.
|
|
||||||
|
|
||||||
--- libs/asio/test/deadline_timer.cpp
|
|
||||||
+++ libs/asio/test/deadline_timer.cpp
|
|
||||||
@@ -180,8 +180,33 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
+void timer_handler(const boost::system::error_code&)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void deadline_timer_cancel_test()
|
|
||||||
+{
|
|
||||||
+ static boost::asio::io_service io_service;
|
|
||||||
+ struct timer
|
|
||||||
+ {
|
|
||||||
+ boost::asio::deadline_timer t;
|
|
||||||
+ timer() : t(io_service) { t.expires_at(boost::posix_time::pos_infin); }
|
|
||||||
+ } timers[50];
|
|
||||||
+
|
|
||||||
+ timers[2].t.async_wait(timer_handler);
|
|
||||||
+ timers[41].t.async_wait(timer_handler);
|
|
||||||
+ for (int i = 10; i < 20; ++i)
|
|
||||||
+ timers[i].t.async_wait(timer_handler);
|
|
||||||
+
|
|
||||||
+ BOOST_CHECK(timers[2].t.cancel() == 1);
|
|
||||||
+ BOOST_CHECK(timers[41].t.cancel() == 1);
|
|
||||||
+ for (int i = 10; i < 20; ++i)
|
|
||||||
+ BOOST_CHECK(timers[i].t.cancel() == 1);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
test_suite* init_unit_test_suite(int, char*[])
|
|
||||||
{
|
|
||||||
test_suite* test = BOOST_TEST_SUITE("deadline_timer");
|
|
||||||
test->add(BOOST_TEST_CASE(&deadline_timer_test));
|
|
||||||
+ test->add(BOOST_TEST_CASE(&deadline_timer_cancel_test));
|
|
||||||
return test;
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
--- boost/asio/detail/hash_map.hpp
|
|
||||||
+++ boost/asio/detail/hash_map.hpp
|
|
||||||
@@ -232,7 +232,11 @@
|
|
||||||
buckets_[bucket].first = buckets_[bucket].last = iter++;
|
|
||||||
}
|
|
||||||
+ else if (++buckets_[bucket].last == iter)
|
|
||||||
+ {
|
|
||||||
+ ++iter;
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- values_.splice(++buckets_[bucket].last, values_, iter++);
|
|
||||||
+ values_.splice(buckets_[bucket].last, values_, iter++);
|
|
||||||
--buckets_[bucket].last;
|
|
||||||
}
|
|
@ -1,344 +0,0 @@
|
|||||||
Index: boost/intrusive/hashtable.hpp
|
|
||||||
===================================================================
|
|
||||||
--- boost/intrusive/hashtable.hpp.orig 2009-10-15 20:46:26.000000000 +0200
|
|
||||||
+++ boost/intrusive/hashtable.hpp 2010-04-08 13:51:49.307002153 +0200
|
|
||||||
@@ -570,6 +570,7 @@ template<class T, class ...Options>
|
|
||||||
#else
|
|
||||||
template<class Config>
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
class hashtable_impl
|
|
||||||
: private detail::clear_on_destructor_base<hashtable_impl<Config> >
|
|
||||||
{
|
|
||||||
@@ -2879,15 +2880,16 @@ template < class T
|
|
||||||
#else
|
|
||||||
template <class T, bool UniqueKeys, class ...Options>
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
struct make_hashtable_opt
|
|
||||||
{
|
|
||||||
typedef typename pack_options
|
|
||||||
< uset_defaults<T>,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type packed_options;
|
|
||||||
|
|
||||||
//Real value traits must be calculated from options
|
|
||||||
@@ -2947,17 +2949,18 @@ template<class T, class O1 = none, class
|
|
||||||
, class O9 = none, class O10= none
|
|
||||||
>
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
struct make_hashtable
|
|
||||||
{
|
|
||||||
/// @cond
|
|
||||||
typedef hashtable_impl
|
|
||||||
< typename make_hashtable_opt
|
|
||||||
<T, false,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type
|
|
||||||
> implementation_defined;
|
|
||||||
|
|
||||||
@@ -2972,21 +2975,22 @@ template<class T, class ...Options>
|
|
||||||
#else
|
|
||||||
template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10>
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
class hashtable
|
|
||||||
: public make_hashtable<T,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type
|
|
||||||
{
|
|
||||||
typedef typename make_hashtable<T,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type Base;
|
|
||||||
|
|
||||||
public:
|
|
||||||
@@ -3011,7 +3015,7 @@ class hashtable
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
|
|
||||||
-#endif
|
|
||||||
+#endif // BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
|
||||||
|
|
||||||
} //namespace intrusive
|
|
||||||
} //namespace boost
|
|
||||||
Index: boost/intrusive/rbtree.hpp
|
|
||||||
===================================================================
|
|
||||||
--- boost/intrusive/rbtree.hpp.orig 2009-10-15 20:46:26.000000000 +0200
|
|
||||||
+++ boost/intrusive/rbtree.hpp 2010-04-08 13:55:55.579002923 +0200
|
|
||||||
@@ -865,11 +865,11 @@ class rbtree_impl
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
|
||||||
template<class Disposer>
|
|
||||||
iterator erase_and_dispose(iterator i, Disposer disposer)
|
|
||||||
{ return this->erase_and_dispose(const_iterator(i), disposer); }
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
|
|
||||||
//!
|
|
||||||
@@ -1530,11 +1530,11 @@ struct make_rbtree_opt
|
|
||||||
{
|
|
||||||
typedef typename pack_options
|
|
||||||
< set_defaults<T>,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type packed_options;
|
|
||||||
typedef typename detail::get_value_traits
|
|
||||||
<T, typename packed_options::value_traits>::type value_traits;
|
|
||||||
@@ -1561,11 +1561,11 @@ struct make_rbtree
|
|
||||||
/// @cond
|
|
||||||
typedef rbtree_impl
|
|
||||||
< typename make_rbtree_opt<T,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type
|
|
||||||
> implementation_defined;
|
|
||||||
/// @endcond
|
|
||||||
@@ -1581,20 +1581,20 @@ template<class T, class ...Options>
|
|
||||||
#endif
|
|
||||||
class rbtree
|
|
||||||
: public make_rbtree<T,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type
|
|
||||||
{
|
|
||||||
typedef typename make_rbtree
|
|
||||||
<T,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type Base;
|
|
||||||
|
|
||||||
public:
|
|
||||||
@@ -1632,7 +1632,7 @@ class rbtree
|
|
||||||
{ return static_cast<const rbtree &>(Base::container_from_iterator(it)); }
|
|
||||||
};
|
|
||||||
|
|
||||||
-#endif
|
|
||||||
+#endif //!BOOST_INTRUSIVE_VARIADIC_TEMPLATES
|
|
||||||
|
|
||||||
|
|
||||||
} //namespace intrusive
|
|
||||||
Index: boost/intrusive/sgtree.hpp
|
|
||||||
===================================================================
|
|
||||||
--- boost/intrusive/sgtree.hpp.orig 2009-10-15 20:46:26.000000000 +0200
|
|
||||||
+++ boost/intrusive/sgtree.hpp 2010-04-08 13:58:34.839825416 +0200
|
|
||||||
@@ -1048,11 +1048,11 @@ class sgtree_impl
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
|
||||||
template<class Disposer>
|
|
||||||
iterator erase_and_dispose(iterator i, Disposer disposer)
|
|
||||||
{ return this->erase_and_dispose(const_iterator(i), disposer); }
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
|
|
||||||
//!
|
|
||||||
@@ -1770,11 +1770,11 @@ struct make_sgtree_opt
|
|
||||||
{
|
|
||||||
typedef typename pack_options
|
|
||||||
< sg_set_defaults<T>,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type packed_options;
|
|
||||||
typedef typename detail::get_value_traits
|
|
||||||
<T, typename packed_options::value_traits>::type value_traits;
|
|
||||||
@@ -1801,11 +1801,11 @@ struct make_sgtree
|
|
||||||
/// @cond
|
|
||||||
typedef sgtree_impl
|
|
||||||
< typename make_sgtree_opt<T,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type
|
|
||||||
> implementation_defined;
|
|
||||||
/// @endcond
|
|
||||||
@@ -1820,20 +1820,20 @@ template<class T, class ...Options>
|
|
||||||
#endif
|
|
||||||
class sgtree
|
|
||||||
: public make_sgtree<T,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type
|
|
||||||
{
|
|
||||||
typedef typename make_sgtree
|
|
||||||
<T,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type Base;
|
|
||||||
|
|
||||||
public:
|
|
||||||
@@ -1865,7 +1865,7 @@ class sgtree
|
|
||||||
{ return static_cast<const sgtree &>(Base::container_from_end_iterator(end_iterator)); }
|
|
||||||
};
|
|
||||||
|
|
||||||
-#endif
|
|
||||||
+#endif //!BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
|
||||||
|
|
||||||
|
|
||||||
} //namespace intrusive
|
|
||||||
Index: boost/intrusive/treap.hpp
|
|
||||||
===================================================================
|
|
||||||
--- boost/intrusive/treap.hpp.orig 2009-10-15 20:46:26.000000000 +0200
|
|
||||||
+++ boost/intrusive/treap.hpp 2010-04-08 14:00:00.043511275 +0200
|
|
||||||
@@ -976,11 +976,11 @@ class treap_impl
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
|
||||||
template<class Disposer>
|
|
||||||
iterator erase_and_dispose(iterator i, Disposer disposer)
|
|
||||||
{ return this->erase_and_dispose(const_iterator(i), disposer); }
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
|
|
||||||
//!
|
|
||||||
@@ -1629,11 +1629,11 @@ struct make_treap_opt
|
|
||||||
{
|
|
||||||
typedef typename pack_options
|
|
||||||
< treap_set_defaults<T>,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type packed_options;
|
|
||||||
typedef typename detail::get_value_traits
|
|
||||||
<T, typename packed_options::value_traits>::type value_traits;
|
|
||||||
@@ -1661,11 +1661,11 @@ struct make_trie
|
|
||||||
/// @cond
|
|
||||||
typedef treap_impl
|
|
||||||
< typename make_treap_opt<T,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type
|
|
||||||
> implementation_defined;
|
|
||||||
/// @endcond
|
|
||||||
@@ -1681,20 +1681,20 @@ template<class T, class ...Options>
|
|
||||||
#endif
|
|
||||||
class treap
|
|
||||||
: public make_trie<T,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type
|
|
||||||
{
|
|
||||||
typedef typename make_trie
|
|
||||||
<T,
|
|
||||||
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
|
||||||
O1, O2, O3, O4
|
|
||||||
- #else
|
|
||||||
+#else
|
|
||||||
Options...
|
|
||||||
- #endif
|
|
||||||
+#endif
|
|
||||||
>::type Base;
|
|
||||||
|
|
||||||
public:
|
|
||||||
@@ -1735,7 +1735,7 @@ class treap
|
|
||||||
{ return static_cast<const treap &>(Base::container_from_iterator(it)); }
|
|
||||||
};
|
|
||||||
|
|
||||||
-#endif
|
|
||||||
+#endif // !BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
|
||||||
|
|
||||||
|
|
||||||
} //namespace intrusive
|
|
@ -1,17 +0,0 @@
|
|||||||
The ifdef is misplaced and leads to compilation errors when
|
|
||||||
when BOOST_NO_EXCEPTIONS is defined (bnc#479659).
|
|
||||||
|
|
||||||
--- boost/function/function_template.hpp
|
|
||||||
+++ boost/function/function_template.hpp
|
|
||||||
@@ -950,10 +950,10 @@
|
|
||||||
f.vtable->manager(f.functor, this->functor,
|
|
||||||
boost::detail::function::move_functor_tag);
|
|
||||||
f.vtable = 0;
|
|
||||||
-#if !defined(BOOST_NO_EXCEPTIONS)
|
|
||||||
} else {
|
|
||||||
clear();
|
|
||||||
}
|
|
||||||
+#if !defined(BOOST_NO_EXCEPTIONS)
|
|
||||||
} catch (...) {
|
|
||||||
vtable = 0;
|
|
||||||
throw;
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -rup boost_1_42_0.orig/boost/visit_each.hpp boost_1_42_0/boost/visit_each.hpp
|
|
||||||
--- boost_1_42_0.orig/boost/visit_each.hpp 2010-04-03 00:03:31.834604103 +0200
|
|
||||||
+++ boost_1_42_0/boost/visit_each.hpp 2010-04-03 00:57:04.831601617 +0200
|
|
||||||
@@ -22,7 +22,7 @@ namespace boost {
|
|
||||||
template<typename Visitor, typename T>
|
|
||||||
inline void visit_each(Visitor& visitor, const T& t)
|
|
||||||
{
|
|
||||||
- visit_each(visitor, t, 0);
|
|
||||||
+ visit_each(visitor, t, (long)0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 26 10:34:26 UTC 2010 - pth@novell.com
|
||||||
|
|
||||||
|
- Delete unneeded patches.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 14 13:54:12 CEST 2010 - pth@suse.de
|
Wed Apr 14 13:54:12 CEST 2010 - pth@suse.de
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user