|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53340 - in trunk/libs/circular_buffer: doc test
From: jano_gaspar_at_[hidden]
Date: 2009-05-28 06:48:22
Author: jano_gaspar
Date: 2009-05-28 06:48:21 EDT (Thu, 28 May 2009)
New Revision: 53340
URL: http://svn.boost.org/trac/boost/changeset/53340
Log:
circular_buffer: fixed bounded_buffer_comparison
Text files modified:
trunk/libs/circular_buffer/doc/circular_buffer.html | 8 ++++----
trunk/libs/circular_buffer/test/bounded_buffer_comparison.cpp | 12 ++++++++----
2 files changed, 12 insertions(+), 8 deletions(-)
Modified: trunk/libs/circular_buffer/doc/circular_buffer.html
==============================================================================
--- trunk/libs/circular_buffer/doc/circular_buffer.html (original)
+++ trunk/libs/circular_buffer/doc/circular_buffer.html 2009-05-28 06:48:21 EDT (Thu, 28 May 2009)
@@ -678,12 +678,12 @@
typedef boost::circular_buffer<T> container_type;
typedef typename container_type::size_type size_type;
typedef typename container_type::value_type value_type;
+ typedef typename boost::call_traits<value_type>::param_type param_type;
explicit bounded_buffer(size_type capacity) : m_unread(0), m_container(capacity) {}
- void push_front(call_traits<value_type>::param_type item) {
- // call_traits<value_type>::param_type represents the "best"
- // way to pass a parameter of type value_type to a method
+ void push_front(boost::call_traits<value_type>::param_type item) {
+ // param_type represents the "best" way to pass a parameter of type value_type to a method
boost::mutex::scoped_lock lock(m_mutex);
m_not_full.wait(lock, boost::bind(&bounded_buffer<value_type>::is_not_full, this));
@@ -717,7 +717,7 @@
</pre>
<p>
The <code>bounded_buffer</code> relies on Boost Threads and <a href=
- "../../bind/bind.html">Boost Bind</a> libraries and call_traits
+ "../../bind/bind.html">Boost Bind</a> libraries and Boost call_traits
utility.
</p>
<p>
Modified: trunk/libs/circular_buffer/test/bounded_buffer_comparison.cpp
==============================================================================
--- trunk/libs/circular_buffer/test/bounded_buffer_comparison.cpp (original)
+++ trunk/libs/circular_buffer/test/bounded_buffer_comparison.cpp 2009-05-28 06:48:21 EDT (Thu, 28 May 2009)
@@ -30,10 +30,11 @@
typedef boost::circular_buffer<T> container_type;
typedef typename container_type::size_type size_type;
typedef typename container_type::value_type value_type;
+ typedef typename boost::call_traits<value_type>::param_type param_type;
explicit bounded_buffer(size_type capacity) : m_unread(0), m_container(capacity) {}
- void push_front(call_traits<value_type>::param_type item) {
+ void push_front(param_type item) {
boost::mutex::scoped_lock lock(m_mutex);
m_not_full.wait(lock, boost::bind(&bounded_buffer<value_type>::is_not_full, this));
m_container.push_front(item);
@@ -71,10 +72,11 @@
typedef boost::circular_buffer_space_optimized<T> container_type;
typedef typename container_type::size_type size_type;
typedef typename container_type::value_type value_type;
+ typedef typename boost::call_traits<value_type>::param_type param_type;
explicit bounded_buffer_space_optimized(size_type capacity) : m_container(capacity) {}
- void push_front(const value_type& item) {
+ void push_front(param_type item) {
boost::mutex::scoped_lock lock(m_mutex);
m_not_full.wait(lock, boost::bind(&bounded_buffer_space_optimized<value_type>::is_not_full, this));
m_container.push_front(item);
@@ -112,10 +114,11 @@
typedef std::deque<T> container_type;
typedef typename container_type::size_type size_type;
typedef typename container_type::value_type value_type;
+ typedef typename boost::call_traits<value_type>::param_type param_type;
explicit bounded_buffer_deque_based(size_type capacity) : m_capacity(capacity) {}
- void push_front(const value_type& item) {
+ void push_front(param_type item) {
boost::mutex::scoped_lock lock(m_mutex);
m_not_full.wait(lock, boost::bind(&bounded_buffer_deque_based<value_type>::is_not_full, this));
m_container.push_front(item);
@@ -154,10 +157,11 @@
typedef std::list<T> container_type;
typedef typename container_type::size_type size_type;
typedef typename container_type::value_type value_type;
+ typedef typename boost::call_traits<value_type>::param_type param_type;
explicit bounded_buffer_list_based(size_type capacity) : m_capacity(capacity) {}
- void push_front(const value_type& item) {
+ void push_front(param_type item) {
boost::mutex::scoped_lock lock(m_mutex);
m_not_full.wait(lock, boost::bind(&bounded_buffer_list_based<value_type>::is_not_full, this));
m_container.push_front(item);
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