summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ACE/ace/Array_Map.h11
-rw-r--r--ACE/ace/Array_Map.inl8
2 files changed, 11 insertions, 8 deletions
diff --git a/ACE/ace/Array_Map.h b/ACE/ace/Array_Map.h
index adad5218748..dea7e472685 100644
--- a/ACE/ace/Array_Map.h
+++ b/ACE/ace/Array_Map.h
@@ -33,6 +33,14 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+#if defined __SUNPRO_CC && !defined _RWSTD_ALLOCATOR
+# define ACE_ARRAY_MAP_DEFAULT_ALLOCATOR(K, V) std::allocator_interface< \
+ std::allocator<void>, \
+ std::pair<K, V> >
+#else
+# define ACE_ARRAY_MAP_DEFAULT_ALLOCATOR(K, V) std::allocator<std::pair<K, V> >
+#endif
+
/**
* @class ACE_Array_Map
*
@@ -83,7 +91,8 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
* -# Copy constructor
* -# operator=
*/
-template<typename Key, typename Value, class EqualTo = std::equal_to<Key>, class Alloc = std::allocator<std::pair<Key, Value> > >
+template<typename Key, typename Value, class EqualTo = std::equal_to<Key>,
+ class Alloc = ACE_ARRAY_MAP_DEFAULT_ALLOCATOR (Key, Value) >
class ACE_Array_Map
{
public:
diff --git a/ACE/ace/Array_Map.inl b/ACE/ace/Array_Map.inl
index 0225dc8d5dc..32e7848c02d 100644
--- a/ACE/ace/Array_Map.inl
+++ b/ACE/ace/Array_Map.inl
@@ -1,19 +1,13 @@
// -*- C++ -*-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-#if defined __SUNPRO_CC && !defined _RWSTD_ALLOCATOR
-# define ACE_SUNCC_CAST (pointer)
-#else
-# define ACE_SUNCC_CAST
-#endif
-
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE
ACE_Array_Map<Key, Value, EqualTo, Alloc>::ACE_Array_Map (
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::size_type s)
: size_ (0)
, capacity_ (s)
- , nodes_ (s == 0 ? 0 : ACE_SUNCC_CAST this->alloc_.allocate (s))
+ , nodes_ (s == 0 ? 0 : this->alloc_.allocate (s))
{
std::uninitialized_fill_n (this->nodes_, s, value_type ());
}