|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81461 - in trunk/boost/heap: . detail
From: tim_at_[hidden]
Date: 2012-11-21 11:18:28
Author: timblechmann
Date: 2012-11-21 11:18:27 EST (Wed, 21 Nov 2012)
New Revision: 81461
URL: http://svn.boost.org/trac/boost/changeset/81461
Log:
heap: remove deprecated macros and comply with boost style guides
Text files modified:
trunk/boost/heap/binomial_heap.hpp | 4 ++--
trunk/boost/heap/d_ary_heap.hpp | 6 +++---
trunk/boost/heap/detail/heap_node.hpp | 6 +++---
trunk/boost/heap/detail/mutable_heap.hpp | 2 +-
trunk/boost/heap/detail/ordered_adaptor_iterator.hpp | 2 +-
trunk/boost/heap/detail/stable_heap.hpp | 4 ++--
trunk/boost/heap/fibonacci_heap.hpp | 4 ++--
trunk/boost/heap/pairing_heap.hpp | 6 +++---
trunk/boost/heap/priority_queue.hpp | 2 +-
trunk/boost/heap/skew_heap.hpp | 10 +++++-----
10 files changed, 23 insertions(+), 23 deletions(-)
Modified: trunk/boost/heap/binomial_heap.hpp
==============================================================================
--- trunk/boost/heap/binomial_heap.hpp (original)
+++ trunk/boost/heap/binomial_heap.hpp 2012-11-21 11:18:27 EST (Wed, 21 Nov 2012)
@@ -354,7 +354,7 @@
return handle_type(n);
}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
/**
* \b Effects: Adds a new element to the priority queue. The element is directly constructed in-place. Returns handle to element.
*
@@ -529,7 +529,7 @@
rhs.set_size(0);
rhs.top_element = NULL;
- super_t::set_stability_count(std::max(super_t::get_stability_count(),
+ super_t::set_stability_count((std::max)(super_t::get_stability_count(),
rhs.get_stability_count()));
rhs.set_stability_count(0);
}
Modified: trunk/boost/heap/d_ary_heap.hpp
==============================================================================
--- trunk/boost/heap/d_ary_heap.hpp (original)
+++ trunk/boost/heap/d_ary_heap.hpp 2012-11-21 11:18:27 EST (Wed, 21 Nov 2012)
@@ -213,7 +213,7 @@
siftup(q_.size() - 1);
}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <class... Args>
void emplace(Args&&... args)
{
@@ -351,7 +351,7 @@
typedef typename container_type::const_iterator container_iterator;
const size_t first_index = first_child_index(index);
- const size_type last_index = std::min(first_index + D - 1, size() - 1);
+ const size_type last_index = (std::min)(first_index + D - 1, size() - 1);
return last_index;
}
@@ -587,7 +587,7 @@
return super_t::push(v);
}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
/// \copydoc boost::heap::priority_queue::emplace
template <class... Args>
typename mpl::if_c<is_mutable, handle_type, void>::type emplace(Args&&... args)
Modified: trunk/boost/heap/detail/heap_node.hpp
==============================================================================
--- trunk/boost/heap/detail/heap_node.hpp (original)
+++ trunk/boost/heap/detail/heap_node.hpp 2012-11-21 11:18:27 EST (Wed, 21 Nov 2012)
@@ -171,7 +171,7 @@
value(v)
{}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <class... Args>
heap_node(Args&&... args):
value(std::forward<Args>(args)...)
@@ -230,7 +230,7 @@
super_t(v), parent(NULL)
{}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <class... Args>
parent_pointing_heap_node(Args&&... args):
super_t(std::forward<Args>(args)...), parent(NULL)
@@ -310,7 +310,7 @@
super_t(v), mark(false)
{}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <class... Args>
marked_heap_node(Args&&... args):
super_t(std::forward<Args>(args)...), mark(false)
Modified: trunk/boost/heap/detail/mutable_heap.hpp
==============================================================================
--- trunk/boost/heap/detail/mutable_heap.hpp (original)
+++ trunk/boost/heap/detail/mutable_heap.hpp 2012-11-21 11:18:27 EST (Wed, 21 Nov 2012)
@@ -339,7 +339,7 @@
return handle_type(ret);
}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <class... Args>
handle_type emplace(Args&&... args)
{
Modified: trunk/boost/heap/detail/ordered_adaptor_iterator.hpp
==============================================================================
--- trunk/boost/heap/detail/ordered_adaptor_iterator.hpp (original)
+++ trunk/boost/heap/detail/ordered_adaptor_iterator.hpp 2012-11-21 11:18:27 EST (Wed, 21 Nov 2012)
@@ -76,7 +76,7 @@
public:
ordered_adaptor_iterator(void):
- container(NULL), current_index(std::numeric_limits<size_t>::max()),
+ container(NULL), current_index((std::numeric_limits<size_t>::max)()),
unvisited_nodes(compare_by_heap_value(NULL, ValueCompare()))
{}
Modified: trunk/boost/heap/detail/stable_heap.hpp
==============================================================================
--- trunk/boost/heap/detail/stable_heap.hpp (original)
+++ trunk/boost/heap/detail/stable_heap.hpp 2012-11-21 11:18:27 EST (Wed, 21 Nov 2012)
@@ -359,12 +359,12 @@
return std::make_pair(val, count);
}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <class... Args>
internal_type make_node(Args&&... args)
{
stability_counter_type count = ++counter_;
- if (counter_ == std::numeric_limits<stability_counter_type>::max())
+ if (counter_ == (std::numeric_limits<stability_counter_type>::max)())
BOOST_THROW_EXCEPTION(std::runtime_error("boost::heap counter overflow"));
return std::make_pair(std::forward<T>(args)..., count);
}
Modified: trunk/boost/heap/fibonacci_heap.hpp
==============================================================================
--- trunk/boost/heap/fibonacci_heap.hpp (original)
+++ trunk/boost/heap/fibonacci_heap.hpp 2012-11-21 11:18:27 EST (Wed, 21 Nov 2012)
@@ -359,7 +359,7 @@
return handle_type(n);
}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
/**
* \b Effects: Adds a new element to the priority queue. The element is directly constructed in-place. Returns handle to element.
*
@@ -610,7 +610,7 @@
rhs.set_size(0);
- super_t::set_stability_count(std::max(super_t::get_stability_count(),
+ super_t::set_stability_count((std::max)(super_t::get_stability_count(),
rhs.get_stability_count()));
rhs.set_stability_count(0);
}
Modified: trunk/boost/heap/pairing_heap.hpp
==============================================================================
--- trunk/boost/heap/pairing_heap.hpp (original)
+++ trunk/boost/heap/pairing_heap.hpp 2012-11-21 11:18:27 EST (Wed, 21 Nov 2012)
@@ -357,7 +357,7 @@
return handle_type(n);
}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
/**
* \b Effects: Adds a new element to the priority queue. The element is directly constructed in-place. Returns handle to element.
*
@@ -579,7 +579,7 @@
rhs.set_size(0);
rhs.root = NULL;
- super_t::set_stability_count(std::max(super_t::get_stability_count(),
+ super_t::set_stability_count((std::max)(super_t::get_stability_count(),
rhs.get_stability_count()));
rhs.set_stability_count(0);
}
@@ -674,7 +674,7 @@
node_pointer merge_first_pair(node_child_list & children)
{
- assert(!children.empty());
+ BOOST_HEAP_ASSERT(!children.empty());
node_pointer first_child = static_cast<node_pointer>(&children.front());
children.pop_front();
if (children.empty())
Modified: trunk/boost/heap/priority_queue.hpp
==============================================================================
--- trunk/boost/heap/priority_queue.hpp (original)
+++ trunk/boost/heap/priority_queue.hpp 2012-11-21 11:18:27 EST (Wed, 21 Nov 2012)
@@ -242,7 +242,7 @@
std::push_heap(q_.begin(), q_.end(), static_cast<super_t const &>(*this));
}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
/**
* \b Effects: Adds a new element to the priority queue. The element is directly constructed in-place.
*
Modified: trunk/boost/heap/skew_heap.hpp
==============================================================================
--- trunk/boost/heap/skew_heap.hpp (original)
+++ trunk/boost/heap/skew_heap.hpp 2012-11-21 11:18:27 EST (Wed, 21 Nov 2012)
@@ -423,7 +423,7 @@
return push_helper::push(this, v);
}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
/**
* \b Effects: Adds a new element to the priority queue. The element is directly constructed in-place.
*
@@ -564,7 +564,7 @@
rhs.root = NULL;
sanity_check();
- super_t::set_stability_count(std::max(super_t::get_stability_count(),
+ super_t::set_stability_count((std::max)(super_t::get_stability_count(),
rhs.get_stability_count()));
rhs.set_stability_count(0);
}
@@ -762,7 +762,7 @@
self->push_internal(v);
}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <class... Args>
static void emplace(skew_heap * self, Args&&... args)
{
@@ -778,7 +778,7 @@
return handle_type(self->push_internal(v));
}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <class... Args>
static handle_type emplace(skew_heap * self, Args&&... args)
{
@@ -798,7 +798,7 @@
return n;
}
-#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <class... Args>
node_pointer emplace_internal(Args&&... args)
{
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