54 #ifndef __itk_hash_map_h
55 #define __itk_hash_map_h
58 #pragma warning ( disable : 4786 )
61 #if (defined(__GNUC__) && (((__GNUC__==3) && (__GNUC_MINOR__>=1) || (__GNUC__>3) ) || ( (__GNUC__==4) && defined(__INTEL_COMPILER) ) )) || (defined(__IBMCPP__) && __IBMCPP__ >= 600)
69 #include <ext/hash_map>
74 using __gnu_cxx::hash;
75 using __gnu_cxx::hash_map;
76 using __gnu_cxx::hash_multimap;
86 #if defined(__MWERKS__)
87 #include "vcl_functional.h"
90 #include "vcl_compiler.h"
96 # define VCL_IMPORT_CONTAINER_TYPEDEFS(super) \
97 typedef typename super::value_type value_type; \
98 typedef typename super::reference reference; \
99 typedef typename super::size_type size_type; \
100 typedef typename super::const_reference const_reference; \
101 typedef typename super::difference_type difference_type;
103 # define VCL_IMPORT_ITERATORS(super) \
104 typedef typename super::iterator iterator; \
105 typedef typename super::const_iterator const_iterator;
107 # define VCL_IMPORT_REVERSE_ITERATORS(super) \
108 typedef typename super::const_reverse_iterator const_reverse_iterator; \
109 typedef typename super::reverse_iterator reverse_iterator;
111 template <
class Key,
class T,
class HashFcn,
class EqualKey,
class Alloc>
113 template <
class Key,
class T,
class HashFcn,
class EqualKey,
class Alloc>
116 template <
class Key,
class T,
class HashFcn,
class EqualKey,
class Alloc>
117 bool operator==(
const hash_map<Key, T, HashFcn, EqualKey, Alloc>&,
118 const hash_map<Key, T, HashFcn, EqualKey, Alloc>&);
119 template <
class Key,
class T,
class HashFcn,
class EqualKey,
class Alloc>
120 bool operator==(
const hash_multimap<Key, T, HashFcn, EqualKey, Alloc>&,
121 const hash_multimap<Key, T, HashFcn, EqualKey, Alloc>&);
127 template <
class Key,
class T,
128 VCL_DFL_TMPL_PARAM_STLDECL(HashFcn,hash<Key>),
129 VCL_DFL_TMPL_PARAM_STLDECL(EqualKey,std::equal_to<Key>),
130 VCL_DFL_TYPE_PARAM_STLDECL(Alloc,std::allocator<char> ) >
134 typedef std::select1st<std::pair<const Key, T> >
sel1st;
173 hash_map(const_iterator f, const_iterator l, size_type n)
175 hash_map(const_iterator f, const_iterator l, size_type n,
178 hash_map(const_iterator f, const_iterator l, size_type n,
189 friend bool operator==ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT(
self)(
const self &,
const self &);
235 template <
class Key,
class T, VCL_DFL_TMPL_PARAM_STLDECL(HashFcn,hash<Key>),
236 VCL_DFL_TMPL_PARAM_STLDECL(EqualKey,std::equal_to<Key>),
237 VCL_DFL_TYPE_PARAM_STLDECL(Alloc,std::allocator<
char> ) >
242 std::select1st<std::pair<const Key, T> >, EqualKey, Alloc>
ht;
295 friend bool operator==ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT(
self)(
const self &,
const self &);
335 template <
class Key,
class T,
class HashFcn,
class EqualKey,
class Alloc>
339 return hm1.
rep == hm2.
rep;
344 template <
class Key,
class T,
class HashFcn,
class EqualKey,
class Alloc>
348 return hm1.
rep == hm2.
rep;
352 #define HASH_MAP_INSTANTIATE \
353 extern "please include emulation/hash_map.txx instead"
359 #endif // itk_emulation_hash_map_h