mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 11:27:15 +02:00
Some workarounds for old versions of Borland.
[SVN r53316]
This commit is contained in:
@ -89,7 +89,7 @@ namespace boost {
|
|||||||
struct value_base {
|
struct value_base {
|
||||||
typename boost::aligned_storage<
|
typename boost::aligned_storage<
|
||||||
sizeof(value_type),
|
sizeof(value_type),
|
||||||
boost::alignment_of<value_type>::value>::type data_;
|
::boost::alignment_of<value_type>::value>::type data_;
|
||||||
|
|
||||||
void* address() { return this; }
|
void* address() { return this; }
|
||||||
};
|
};
|
||||||
|
@ -39,6 +39,9 @@ namespace boost
|
|||||||
template <class Key, class T, class Hash, class Pred, class Alloc>
|
template <class Key, class T, class Hash, class Pred, class Alloc>
|
||||||
class unordered_map
|
class unordered_map
|
||||||
{
|
{
|
||||||
|
#if BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
||||||
|
public:
|
||||||
|
#endif
|
||||||
typedef boost::unordered_detail::hash_types_unique_keys<
|
typedef boost::unordered_detail::hash_types_unique_keys<
|
||||||
std::pair<const Key, T>, Key, Hash, Pred, Alloc
|
std::pair<const Key, T>, Key, Hash, Pred, Alloc
|
||||||
> implementation;
|
> implementation;
|
||||||
@ -461,7 +464,7 @@ namespace boost
|
|||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||||
friend bool operator==(unordered_map const&, unordered_map const&);
|
friend bool operator==(unordered_map const&, unordered_map const&);
|
||||||
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&);
|
||||||
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
|
#endif
|
||||||
@ -491,6 +494,9 @@ namespace boost
|
|||||||
template <class Key, class T, class Hash, class Pred, class Alloc>
|
template <class Key, class T, class Hash, class Pred, class Alloc>
|
||||||
class unordered_multimap
|
class unordered_multimap
|
||||||
{
|
{
|
||||||
|
#if BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
||||||
|
public:
|
||||||
|
#endif
|
||||||
typedef boost::unordered_detail::hash_types_equivalent_keys<
|
typedef boost::unordered_detail::hash_types_equivalent_keys<
|
||||||
std::pair<const Key, T>, Key, Hash, Pred, Alloc
|
std::pair<const Key, T>, Key, Hash, Pred, Alloc
|
||||||
> implementation;
|
> implementation;
|
||||||
@ -897,7 +903,7 @@ namespace boost
|
|||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||||
friend bool operator==(unordered_multimap const&, unordered_multimap const&);
|
friend bool operator==(unordered_multimap const&, unordered_multimap const&);
|
||||||
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&);
|
||||||
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
|
#endif
|
||||||
|
@ -39,6 +39,9 @@ namespace boost
|
|||||||
template <class Value, class Hash, class Pred, class Alloc>
|
template <class Value, class Hash, class Pred, class Alloc>
|
||||||
class unordered_set
|
class unordered_set
|
||||||
{
|
{
|
||||||
|
#if BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
||||||
|
public:
|
||||||
|
#endif
|
||||||
typedef boost::unordered_detail::hash_types_unique_keys<
|
typedef boost::unordered_detail::hash_types_unique_keys<
|
||||||
Value, Value, Hash, Pred, Alloc
|
Value, Value, Hash, Pred, Alloc
|
||||||
> implementation;
|
> implementation;
|
||||||
@ -430,10 +433,10 @@ namespace boost
|
|||||||
base.rehash(n);
|
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&);
|
||||||
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&);
|
||||||
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
|
#endif
|
||||||
@ -463,6 +466,9 @@ namespace boost
|
|||||||
template <class Value, class Hash, class Pred, class Alloc>
|
template <class Value, class Hash, class Pred, class Alloc>
|
||||||
class unordered_multiset
|
class unordered_multiset
|
||||||
{
|
{
|
||||||
|
#if BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
||||||
|
public:
|
||||||
|
#endif
|
||||||
typedef boost::unordered_detail::hash_types_equivalent_keys<
|
typedef boost::unordered_detail::hash_types_equivalent_keys<
|
||||||
Value, Value, Hash, Pred, Alloc
|
Value, Value, Hash, Pred, Alloc
|
||||||
> implementation;
|
> implementation;
|
||||||
@ -850,10 +856,10 @@ namespace boost
|
|||||||
base.rehash(n);
|
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&);
|
||||||
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&);
|
||||||
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
|
#endif
|
||||||
|
@ -81,7 +81,7 @@ namespace test
|
|||||||
T* operator->() const { return &ptr_->value_; }
|
T* operator->() const { return &ptr_->value_; }
|
||||||
list_iterator& operator++() {
|
list_iterator& operator++() {
|
||||||
ptr_ = ptr_->next_; return *this; }
|
ptr_ = ptr_->next_; return *this; }
|
||||||
list_iterator& operator++(int) {
|
list_iterator operator++(int) {
|
||||||
list_iterator tmp = *this; ptr_ = ptr_->next_; return tmp; }
|
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_; }
|
||||||
bool operator!=(const_iterator y) const { return ptr_ != y.ptr_; }
|
bool operator!=(const_iterator y) const { return ptr_ != y.ptr_; }
|
||||||
@ -108,7 +108,7 @@ namespace test
|
|||||||
T const* operator->() const { return &ptr_->value_; }
|
T const* operator->() const { return &ptr_->value_; }
|
||||||
list_const_iterator& operator++() {
|
list_const_iterator& operator++() {
|
||||||
ptr_ = ptr_->next_; return *this; }
|
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; }
|
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_; }
|
||||||
bool operator!=(const_iterator y) const { return ptr_ != y.ptr_; }
|
bool operator!=(const_iterator y) const { return ptr_ != y.ptr_; }
|
||||||
|
Reference in New Issue
Block a user