Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 1999, 2000
5 * This material is provided "as is", with absolutely no warranty expressed
6 * or implied. Any use is at your own risk.
8 * Permission to use or copy this software for any purpose is hereby granted
9 * without fee, provided the above notices are retained on all copies.
10 * Permission to modify the code and to distribute modified code is granted,
11 * provided the above notices are retained, and a notice that the code was
12 * modified is included with the above copyright notice.
16 /* NOTE: This is an internal header file, included by other STL headers.
17 * You should not attempt to use it directly.
20 #ifndef _STLP_INTERNAL_WRAP_MAP_H
21 #define _STLP_INTERNAL_WRAP_MAP_H
23 #ifndef _STLP_INTERNAL_MAP_H
24 # include <stl/_map.h>
27 # ifdef _STLP_USE_NAMESPACES
31 # if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
32 # define __MAP_TEMPLATE_HEADER template <class _Key, class _Tp>
33 # define __MAP_ARGUMENTS _Key, _Tp
34 # define __MMAP_TEMPLATE_HEADER template <class _Key, class _Tp>
35 # define __MMAP_ARGUMENTS _Key, _Tp
36 # define _Compare less<_Key>
38 # define __MAP_TEMPLATE_HEADER template <class _Key, class _Tp, class _Compare >
39 # define __MAP_ARGUMENTS _Key, _Tp, _Compare
40 # define __MMAP_TEMPLATE_HEADER template <class _Key, class _Tp, class _Compare >
41 # define __MMAP_ARGUMENTS _Key, _Tp, _Compare
45 # define __MAP_SUPER __map< _Key, _Tp, _Compare, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp) >
46 # define __MMAP_SUPER __multimap< _Key, _Tp, _Compare, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp) >
48 // provide a "default" map adaptor
50 class map : public __MAP_SUPER
52 typedef map< __MAP_ARGUMENTS > _Self;
54 typedef __MAP_SUPER _Super;
55 __IMPORT_WITH_REVERSE_ITERATORS(_Super)
56 __IMPORT_SUPER_COPY_ASSIGNMENT(map, _Self, __MAP_SUPER)
57 map() : __MAP_SUPER(_Compare()) {}
58 explicit map(const _Compare& __comp) : __MAP_SUPER(__comp) {}
59 map(const typename _Super::value_type* __first,
60 const typename _Super::value_type* __last) :
61 __MAP_SUPER(__first, __last, _Compare()) { }
62 map(const typename _Super::value_type* __first,
63 const typename _Super::value_type* __last,
64 const _Compare& __comp) : __MAP_SUPER(__first, __last, __comp) { }
65 map(typename _Super::const_iterator __first,
66 typename _Super::const_iterator __last) :
67 __MAP_SUPER(__first, __last, _Compare()) { }
68 map(typename _Super::const_iterator __first,
69 typename _Super::const_iterator __last,
70 const _Compare& __comp) : __MAP_SUPER(__first, __last, __comp) { }
73 # if defined (_STLP_BASE_MATCH_BUG)
75 inline bool operator==(const map< __MAP_ARGUMENTS >& __x,
76 const map< __MAP_ARGUMENTS >& __y) {
77 typedef __MAP_SUPER _Super;
78 return operator==((const _Super&)__x,(const _Super&)__y);
82 inline bool operator<(const map< __MAP_ARGUMENTS >& __x,
83 const map< __MAP_ARGUMENTS >& __y) {
84 typedef __MAP_SUPER _Super;
85 return operator < ((const _Super&)__x,(const _Super&)__y);
87 # endif /* _STLP_BASE_MATCH_BUG */
90 // provide a "default" multimap adaptor
91 __MMAP_TEMPLATE_HEADER
92 class multimap : public __MMAP_SUPER
94 typedef multimap< __MMAP_ARGUMENTS > _Self;
96 typedef __MMAP_SUPER _Super;
97 __IMPORT_WITH_REVERSE_ITERATORS(_Super)
98 // copy & assignment from super
99 __IMPORT_SUPER_COPY_ASSIGNMENT(multimap, _Self, __MMAP_SUPER)
100 multimap() : __MMAP_SUPER(_Compare()) {}
101 explicit multimap(const _Compare& __comp) : __MMAP_SUPER(__comp) {}
102 multimap(const typename _Super::value_type* __first,
103 const typename _Super::value_type* __last) :
104 __MMAP_SUPER(__first, __last, _Compare()) { }
105 multimap(const typename _Super::value_type* __first,
106 const typename _Super::value_type* __last,
107 const _Compare& __comp) : __MMAP_SUPER(__first, __last, __comp) { }
108 multimap(typename _Super::const_iterator __first,
109 typename _Super::const_iterator __last) :
110 __MMAP_SUPER(__first, __last, _Compare()) { }
111 multimap(typename _Super::const_iterator __first,
112 typename _Super::const_iterator __last,
113 const _Compare& __comp) : __MMAP_SUPER(__first, __last, __comp) { }
116 # if defined (_STLP_BASE_MATCH_BUG)
117 __MMAP_TEMPLATE_HEADER
118 inline bool operator==(const multimap< __MMAP_ARGUMENTS >& __x,
119 const multimap< __MMAP_ARGUMENTS >& __y) {
120 typedef __MMAP_SUPER _Super;
121 return (const _Super&)__x == (const _Super&)__y;
124 __MMAP_TEMPLATE_HEADER
125 inline bool operator<(const multimap< __MMAP_ARGUMENTS >& __x,
126 const multimap< __MMAP_ARGUMENTS >& __y) {
127 typedef __MMAP_SUPER _Super;
128 return (const _Super&)__x < (const _Super&)__y;
132 # undef __MMAP_TEMPLATE_HEADER
133 # undef __MMAP_ARGUMENTS
136 # undef __MAP_TEMPLATE_HEADER
137 # undef __MAP_ARGUMENTS
142 # ifdef _STLP_USE_NAMESPACES
143 } /* namespace STLPORT */
146 #endif /* _STLP_INTERNAL_WRAP_MAP_H */