|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53316 - in trunk: boost/unordered boost/unordered/detail libs/unordered/test/helpers
From: daniel_james_at_[hidden]
Date: 2009-05-27 14:19:33
Author: danieljames
Date: 2009-05-27 14:19:32 EDT (Wed, 27 May 2009)
New Revision: 53316
URL: http://svn.boost.org/trac/boost/changeset/53316
Log:
Some workarounds for old versions of Borland.
Text files modified:
trunk/boost/unordered/detail/hash_table_impl.hpp | 2 +-
trunk/boost/unordered/unordered_map.hpp | 10 ++++++++--
trunk/boost/unordered/unordered_set.hpp | 14 ++++++++++----
trunk/libs/unordered/test/helpers/list.hpp | 4 ++--
4 files changed, 21 insertions(+), 9 deletions(-)
Modified: trunk/boost/unordered/detail/hash_table_impl.hpp
==============================================================================
--- trunk/boost/unordered/detail/hash_table_impl.hpp (original)
+++ trunk/boost/unordered/detail/hash_table_impl.hpp 2009-05-27 14:19:32 EDT (Wed, 27 May 2009)
@@ -89,7 +89,7 @@
struct value_base {
typename boost::aligned_storage<
sizeof(value_type),
- boost::alignment_of<value_type>::value>::type data_;
+ ::boost::alignment_of<value_type>::value>::type data_;
void* address() { return this; }
};
Modified: trunk/boost/unordered/unordered_map.hpp
==============================================================================
--- trunk/boost/unordered/unordered_map.hpp (original)
+++ trunk/boost/unordered/unordered_map.hpp 2009-05-27 14:19:32 EDT (Wed, 27 May 2009)
@@ -39,6 +39,9 @@
template <class Key, class T, class Hash, class Pred, class Alloc>
class unordered_map
{
+#if BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+ public:
+#endif
typedef boost::unordered_detail::hash_types_unique_keys<
std::pair<const Key, T>, Key, Hash, Pred, Alloc
> implementation;
@@ -461,7 +464,7 @@
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
friend bool operator==(unordered_map const&, unordered_map const&);
friend bool operator!=(unordered_map const&, unordered_map const&);
-#else
+#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
friend bool operator==<Key, T, Hash, Pred, Alloc>(unordered_map const&, unordered_map const&);
friend bool operator!=<Key, T, Hash, Pred, Alloc>(unordered_map const&, unordered_map const&);
#endif
@@ -491,6 +494,9 @@
template <class Key, class T, class Hash, class Pred, class Alloc>
class unordered_multimap
{
+#if BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+ public:
+#endif
typedef boost::unordered_detail::hash_types_equivalent_keys<
std::pair<const Key, T>, Key, Hash, Pred, Alloc
> implementation;
@@ -897,7 +903,7 @@
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
friend bool operator==(unordered_multimap const&, unordered_multimap const&);
friend bool operator!=(unordered_multimap const&, unordered_multimap const&);
-#else
+#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
friend bool operator==<Key, T, Hash, Pred, Alloc>(unordered_multimap const&, unordered_multimap const&);
friend bool operator!=<Key, T, Hash, Pred, Alloc>(unordered_multimap const&, unordered_multimap const&);
#endif
Modified: trunk/boost/unordered/unordered_set.hpp
==============================================================================
--- trunk/boost/unordered/unordered_set.hpp (original)
+++ trunk/boost/unordered/unordered_set.hpp 2009-05-27 14:19:32 EDT (Wed, 27 May 2009)
@@ -39,6 +39,9 @@
template <class Value, class Hash, class Pred, class Alloc>
class unordered_set
{
+#if BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+ public:
+#endif
typedef boost::unordered_detail::hash_types_unique_keys<
Value, Value, Hash, Pred, Alloc
> implementation;
@@ -430,10 +433,10 @@
base.rehash(n);
}
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+#if 1 || BOOST_WORKAROUND(BOOST_MSVC, < 1300)
friend bool operator==(unordered_set const&, unordered_set const&);
friend bool operator!=(unordered_set const&, unordered_set const&);
-#else
+#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
friend bool operator==<Value, Hash, Pred, Alloc>(unordered_set const&, unordered_set const&);
friend bool operator!=<Value, Hash, Pred, Alloc>(unordered_set const&, unordered_set const&);
#endif
@@ -463,6 +466,9 @@
template <class Value, class Hash, class Pred, class Alloc>
class unordered_multiset
{
+#if BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+ public:
+#endif
typedef boost::unordered_detail::hash_types_equivalent_keys<
Value, Value, Hash, Pred, Alloc
> implementation;
@@ -850,10 +856,10 @@
base.rehash(n);
}
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+#if 1 || BOOST_WORKAROUND(BOOST_MSVC, < 1300)
friend bool operator==(unordered_multiset const&, unordered_multiset const&);
friend bool operator!=(unordered_multiset const&, unordered_multiset const&);
-#else
+#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
friend bool operator==<Value, Hash, Pred, Alloc>(unordered_multiset const&, unordered_multiset const&);
friend bool operator!=<Value, Hash, Pred, Alloc>(unordered_multiset const&, unordered_multiset const&);
#endif
Modified: trunk/libs/unordered/test/helpers/list.hpp
==============================================================================
--- trunk/libs/unordered/test/helpers/list.hpp (original)
+++ trunk/libs/unordered/test/helpers/list.hpp 2009-05-27 14:19:32 EDT (Wed, 27 May 2009)
@@ -81,7 +81,7 @@
T* operator->() const { return &ptr_->value_; }
list_iterator& operator++() {
ptr_ = ptr_->next_; return *this; }
- list_iterator& operator++(int) {
+ list_iterator operator++(int) {
list_iterator tmp = *this; ptr_ = ptr_->next_; return tmp; }
bool operator==(const_iterator y) const { return ptr_ == y.ptr_; }
bool operator!=(const_iterator y) const { return ptr_ != y.ptr_; }
@@ -108,7 +108,7 @@
T const* operator->() const { return &ptr_->value_; }
list_const_iterator& operator++() {
ptr_ = ptr_->next_; return *this; }
- list_const_iterator& operator++(int) {
+ list_const_iterator operator++(int) {
list_const_iterator tmp = *this; ptr_ = ptr_->next_; return tmp; }
bool operator==(const_iterator y) const { return ptr_ == y.ptr_; }
bool operator!=(const_iterator y) const { return ptr_ != y.ptr_; }
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