Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Utils
KWSys
Commits
d93a61e7
Commit
d93a61e7
authored
19 years ago
by
Brad King
Browse files
Options
Downloads
Patches
Plain Diff
COMP: Replaced kwsys_stl with @KWSYS_NAMESPACE@_stl to properly use the configured namespace.
parent
ce23743b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hash_map.hxx.in
+12
-12
12 additions, 12 deletions
hash_map.hxx.in
hash_set.hxx.in
+11
-11
11 additions, 11 deletions
hash_set.hxx.in
hashtable.hxx.in
+35
-35
35 additions, 35 deletions
hashtable.hxx.in
with
58 additions
and
58 deletions
hash_map.hxx.in
+
12
−
12
View file @
d93a61e7
...
...
@@ -60,9 +60,9 @@ namespace @KWSYS_NAMESPACE@
// select1st is an extension: it is not part of the standard.
template <class T1, class T2>
struct hash_select1st:
public
kwsys
_stl::unary_function<
kwsys
_stl::pair<T1, T2>, T1>
public
@KWSYS_NAMESPACE@
_stl::unary_function<
@KWSYS_NAMESPACE@
_stl::pair<T1, T2>, T1>
{
const T1& operator()(const
kwsys
_stl::pair<T1, T2>& __x) const
const T1& operator()(const
@KWSYS_NAMESPACE@
_stl::pair<T1, T2>& __x) const
{ return __x.first; }
};
...
...
@@ -70,7 +70,7 @@ struct hash_select1st:
template <class _Key, class _Tp,
class _HashFcn = hash<_Key>,
class _EqualKey =
kwsys
_stl::equal_to<_Key>,
class _EqualKey =
@KWSYS_NAMESPACE@
_stl::equal_to<_Key>,
class _Alloc = @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(char) >
class hash_map;
...
...
@@ -83,7 +83,7 @@ template <class _Key, class _Tp, class _HashFcn, class _EqualKey,
class hash_map
{
private:
typedef hashtable<
kwsys
_stl::pair<const _Key,_Tp>,_Key,_HashFcn,
typedef hashtable<
@KWSYS_NAMESPACE@
_stl::pair<const _Key,_Tp>,_Key,_HashFcn,
hash_select1st<const _Key,_Tp>,_EqualKey,_Alloc> _Ht;
_Ht _M_ht;
...
...
@@ -191,7 +191,7 @@ public:
const_iterator end() const { return _M_ht.end(); }
public:
kwsys
_stl::pair<iterator,bool> insert(const value_type& __obj)
@KWSYS_NAMESPACE@
_stl::pair<iterator,bool> insert(const value_type& __obj)
{ return _M_ht.insert_unique(__obj); }
#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES
template <class _InputIterator>
...
...
@@ -204,7 +204,7 @@ public:
void insert(const_iterator __f, const_iterator __l)
{ _M_ht.insert_unique(__f, __l); }
#endif
kwsys
_stl::pair<iterator,bool> insert_noresize(const value_type& __obj)
@KWSYS_NAMESPACE@
_stl::pair<iterator,bool> insert_noresize(const value_type& __obj)
{ return _M_ht.insert_unique_noresize(__obj); }
iterator find(const key_type& __key) { return _M_ht.find(__key); }
...
...
@@ -217,9 +217,9 @@ public:
size_type count(const key_type& __key) const { return _M_ht.count(__key); }
kwsys
_stl::pair<iterator, iterator> equal_range(const key_type& __key)
@KWSYS_NAMESPACE@
_stl::pair<iterator, iterator> equal_range(const key_type& __key)
{ return _M_ht.equal_range(__key); }
kwsys
_stl::pair<const_iterator, const_iterator>
@KWSYS_NAMESPACE@
_stl::pair<const_iterator, const_iterator>
equal_range(const key_type& __key) const
{ return _M_ht.equal_range(__key); }
...
...
@@ -262,7 +262,7 @@ swap(hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1,
template <class _Key, class _Tp,
class _HashFcn = hash<_Key>,
class _EqualKey =
kwsys
_stl::equal_to<_Key>,
class _EqualKey =
@KWSYS_NAMESPACE@
_stl::equal_to<_Key>,
class _Alloc = @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(char) >
class hash_multimap;
...
...
@@ -276,7 +276,7 @@ template <class _Key, class _Tp, class _HashFcn, class _EqualKey,
class hash_multimap
{
private:
typedef hashtable<
kwsys
_stl::pair<const _Key, _Tp>, _Key, _HashFcn,
typedef hashtable<
@KWSYS_NAMESPACE@
_stl::pair<const _Key, _Tp>, _Key, _HashFcn,
hash_select1st<const _Key, _Tp>, _EqualKey, _Alloc>
_Ht;
_Ht _M_ht;
...
...
@@ -407,9 +407,9 @@ public:
size_type count(const key_type& __key) const { return _M_ht.count(__key); }
kwsys
_stl::pair<iterator, iterator> equal_range(const key_type& __key)
@KWSYS_NAMESPACE@
_stl::pair<iterator, iterator> equal_range(const key_type& __key)
{ return _M_ht.equal_range(__key); }
kwsys
_stl::pair<const_iterator, const_iterator>
@KWSYS_NAMESPACE@
_stl::pair<const_iterator, const_iterator>
equal_range(const key_type& __key) const
{ return _M_ht.equal_range(__key); }
...
...
This diff is collapsed.
Click to expand it.
hash_set.hxx.in
+
11
−
11
View file @
d93a61e7
...
...
@@ -59,7 +59,7 @@ namespace @KWSYS_NAMESPACE@
// identity is an extension: it is not part of the standard.
template <class _Tp>
struct _Identity : public
kwsys
_stl::unary_function<_Tp,_Tp>
struct _Identity : public
@KWSYS_NAMESPACE@
_stl::unary_function<_Tp,_Tp>
{
const _Tp& operator()(const _Tp& __x) const { return __x; }
};
...
...
@@ -68,7 +68,7 @@ struct _Identity : public kwsys_stl::unary_function<_Tp,_Tp>
template <class _Value,
class _HashFcn = hash<_Value>,
class _EqualKey =
kwsys
_stl::equal_to<_Value>,
class _EqualKey =
@KWSYS_NAMESPACE@
_stl::equal_to<_Value>,
class _Alloc = @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(char) >
class hash_set;
...
...
@@ -186,11 +186,11 @@ public:
iterator end() const { return _M_ht.end(); }
public:
kwsys
_stl::pair<iterator, bool> insert(const value_type& __obj)
@KWSYS_NAMESPACE@
_stl::pair<iterator, bool> insert(const value_type& __obj)
{
typedef typename _Ht::iterator _Ht_iterator;
kwsys
_stl::pair<_Ht_iterator, bool> __p = _M_ht.insert_unique(__obj);
return
kwsys
_stl::pair<iterator,bool>(__p.first, __p.second);
@KWSYS_NAMESPACE@
_stl::pair<_Ht_iterator, bool> __p = _M_ht.insert_unique(__obj);
return
@KWSYS_NAMESPACE@
_stl::pair<iterator,bool>(__p.first, __p.second);
}
#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES
template <class _InputIterator>
...
...
@@ -203,19 +203,19 @@ public:
void insert(const_iterator __f, const_iterator __l)
{_M_ht.insert_unique(__f, __l); }
#endif
kwsys
_stl::pair<iterator, bool> insert_noresize(const value_type& __obj)
@KWSYS_NAMESPACE@
_stl::pair<iterator, bool> insert_noresize(const value_type& __obj)
{
typedef typename _Ht::iterator _Ht_iterator;
kwsys
_stl::pair<_Ht_iterator, bool> __p =
@KWSYS_NAMESPACE@
_stl::pair<_Ht_iterator, bool> __p =
_M_ht.insert_unique_noresize(__obj);
return
kwsys
_stl::pair<iterator, bool>(__p.first, __p.second);
return
@KWSYS_NAMESPACE@
_stl::pair<iterator, bool>(__p.first, __p.second);
}
iterator find(const key_type& __key) const { return _M_ht.find(__key); }
size_type count(const key_type& __key) const { return _M_ht.count(__key); }
kwsys
_stl::pair<iterator, iterator> equal_range(const key_type& __key) const
@KWSYS_NAMESPACE@
_stl::pair<iterator, iterator> equal_range(const key_type& __key) const
{ return _M_ht.equal_range(__key); }
size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
...
...
@@ -256,7 +256,7 @@ swap(hash_set<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
template <class _Value,
class _HashFcn = hash<_Value>,
class _EqualKey =
kwsys
_stl::equal_to<_Value>,
class _EqualKey =
@KWSYS_NAMESPACE@
_stl::equal_to<_Value>,
class _Alloc = @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(char) >
class hash_multiset;
...
...
@@ -395,7 +395,7 @@ public:
size_type count(const key_type& __key) const { return _M_ht.count(__key); }
kwsys
_stl::pair<iterator, iterator> equal_range(const key_type& __key) const
@KWSYS_NAMESPACE@
_stl::pair<iterator, iterator> equal_range(const key_type& __key) const
{ return _M_ht.equal_range(__key); }
size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
...
...
This diff is collapsed.
Click to expand it.
hashtable.hxx.in
+
35
−
35
View file @
d93a61e7
...
...
@@ -55,9 +55,9 @@
#endif
#if @KWSYS_NAMESPACE@_STL_HAS_ALLOCATOR_NONTEMPLATE
# define @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(T)
kwsys
_stl::allocator
# define @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(T)
@KWSYS_NAMESPACE@
_stl::allocator
#else
# define @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(T)
kwsys
_stl::allocator< T >
# define @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(T)
@KWSYS_NAMESPACE@
_stl::allocator< T >
#endif
namespace @KWSYS_NAMESPACE@
...
...
@@ -112,8 +112,8 @@ public:
typedef void* void_pointer;
typedef const void* const_void_pointer;
#else
typedef
kwsys
_stl::allocator<void>::pointer void_pointer;
typedef
kwsys
_stl::allocator<void>::const_pointer const_void_pointer;
typedef
@KWSYS_NAMESPACE@
_stl::allocator<void>::pointer void_pointer;
typedef
@KWSYS_NAMESPACE@
_stl::allocator<void>::const_pointer const_void_pointer;
#endif
pointer allocate(size_type n=1, const_void_pointer hint = 0)
{
...
...
@@ -197,7 +197,7 @@ struct _Hashtable_iterator {
const_iterator;
typedef _Hashtable_node<_Val> _Node;
typedef
kwsys
_stl::forward_iterator_tag iterator_category;
typedef
@KWSYS_NAMESPACE@
_stl::forward_iterator_tag iterator_category;
typedef _Val value_type;
typedef ptrdiff_t difference_type;
typedef size_t size_type;
...
...
@@ -234,7 +234,7 @@ struct _Hashtable_const_iterator {
const_iterator;
typedef _Hashtable_node<_Val> _Node;
typedef
kwsys
_stl::forward_iterator_tag iterator_category;
typedef
@KWSYS_NAMESPACE@
_stl::forward_iterator_tag iterator_category;
typedef _Val value_type;
typedef ptrdiff_t difference_type;
typedef size_t size_type;
...
...
@@ -276,7 +276,7 @@ inline unsigned long _stl_next_prime(unsigned long __n)
{
const unsigned long* __first = _stl_prime_list;
const unsigned long* __last = _stl_prime_list + (int)_stl_num_primes;
const unsigned long* pos =
kwsys
_stl::lower_bound(__first, __last, __n);
const unsigned long* pos =
@KWSYS_NAMESPACE@
_stl::lower_bound(__first, __last, __n);
return pos == __last ? *(__last - 1) : *pos;
}
...
...
@@ -326,7 +326,7 @@ public:
private:
typedef typename _Alloc::template rebind<_Node>::other _M_node_allocator_type;
typedef typename _Alloc::template rebind<_Node*>::other _M_node_ptr_allocator_type;
typedef
kwsys
_stl::vector<_Node*,_M_node_ptr_allocator_type> _M_buckets_type;
typedef
@KWSYS_NAMESPACE@
_stl::vector<_Node*,_M_node_ptr_allocator_type> _M_buckets_type;
#else
public:
typedef hash_allocator<_Val, _Alloc> allocator_type;
...
...
@@ -334,7 +334,7 @@ public:
private:
typedef hash_allocator<_Node, _Alloc> _M_node_allocator_type;
typedef hash_allocator<_Node*, _Alloc> _M_node_ptr_allocator_type;
typedef
kwsys
_stl::vector<_Node*,_M_node_ptr_allocator_type> _M_buckets_type;
typedef
@KWSYS_NAMESPACE@
_stl::vector<_Node*,_M_node_ptr_allocator_type> _M_buckets_type;
#endif
private:
...
...
@@ -421,11 +421,11 @@ public:
void swap(hashtable& __ht)
{
kwsys
_stl::swap(_M_hash, __ht._M_hash);
kwsys
_stl::swap(_M_equals, __ht._M_equals);
kwsys
_stl::swap(_M_get_key, __ht._M_get_key);
@KWSYS_NAMESPACE@
_stl::swap(_M_hash, __ht._M_hash);
@KWSYS_NAMESPACE@
_stl::swap(_M_equals, __ht._M_equals);
@KWSYS_NAMESPACE@
_stl::swap(_M_get_key, __ht._M_get_key);
_M_buckets.swap(__ht._M_buckets);
kwsys
_stl::swap(_M_num_elements, __ht._M_num_elements);
@KWSYS_NAMESPACE@
_stl::swap(_M_num_elements, __ht._M_num_elements);
}
iterator begin()
...
...
@@ -466,7 +466,7 @@ public:
return __result;
}
kwsys
_stl::pair<iterator, bool> insert_unique(const value_type& __obj)
@KWSYS_NAMESPACE@
_stl::pair<iterator, bool> insert_unique(const value_type& __obj)
{
resize(_M_num_elements + 1);
return insert_unique_noresize(__obj);
...
...
@@ -478,18 +478,18 @@ public:
return insert_equal_noresize(__obj);
}
kwsys
_stl::pair<iterator, bool> insert_unique_noresize(const value_type& __obj);
@KWSYS_NAMESPACE@
_stl::pair<iterator, bool> insert_unique_noresize(const value_type& __obj);
iterator insert_equal_noresize(const value_type& __obj);
#if @KWSYS_NAMESPACE@_STL_HAS_ITERATOR_TRAITS
# define @KWSYS_NAMESPACE@_HASH_ITERATOR_CATEGORY(T,I) \
typename
kwsys
_stl::iterator_traits< T >::iterator_category()
typename
@KWSYS_NAMESPACE@
_stl::iterator_traits< T >::iterator_category()
#elif @KWSYS_NAMESPACE@_STL_HAS_ITERATOR_CATEGORY
# define @KWSYS_NAMESPACE@_HASH_ITERATOR_CATEGORY(T,I) \
kwsys
_stl::iterator_category( I )
@KWSYS_NAMESPACE@
_stl::iterator_category( I )
#elif @KWSYS_NAMESPACE@_STL_HAS___ITERATOR_CATEGORY
# define @KWSYS_NAMESPACE@_HASH_ITERATOR_CATEGORY(T,I) \
kwsys
_stl::__iterator_category( I )
@KWSYS_NAMESPACE@
_stl::__iterator_category( I )
#endif
#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES && \
...
...
@@ -510,7 +510,7 @@ public:
template <class _InputIterator>
void insert_unique(_InputIterator __f, _InputIterator __l,
kwsys
_stl::input_iterator_tag)
@KWSYS_NAMESPACE@
_stl::input_iterator_tag)
{
for ( ; __f != __l; ++__f)
insert_unique(*__f);
...
...
@@ -518,7 +518,7 @@ public:
template <class _InputIterator>
void insert_equal(_InputIterator __f, _InputIterator __l,
kwsys
_stl::input_iterator_tag)
@KWSYS_NAMESPACE@
_stl::input_iterator_tag)
{
for ( ; __f != __l; ++__f)
insert_equal(*__f);
...
...
@@ -526,10 +526,10 @@ public:
template <class _ForwardIterator>
void insert_unique(_ForwardIterator __f, _ForwardIterator __l,
kwsys
_stl::forward_iterator_tag)
@KWSYS_NAMESPACE@
_stl::forward_iterator_tag)
{
size_type __n = 0;
kwsys
_stl::distance(__f, __l, __n);
@KWSYS_NAMESPACE@
_stl::distance(__f, __l, __n);
resize(_M_num_elements + __n);
for ( ; __n > 0; --__n, ++__f)
insert_unique_noresize(*__f);
...
...
@@ -537,10 +537,10 @@ public:
template <class _ForwardIterator>
void insert_equal(_ForwardIterator __f, _ForwardIterator __l,
kwsys
_stl::forward_iterator_tag)
@KWSYS_NAMESPACE@
_stl::forward_iterator_tag)
{
size_type __n = 0;
kwsys
_stl::distance(__f, __l, __n);
@KWSYS_NAMESPACE@
_stl::distance(__f, __l, __n);
resize(_M_num_elements + __n);
for ( ; __n > 0; --__n, ++__f)
insert_equal_noresize(*__f);
...
...
@@ -566,7 +566,7 @@ public:
void insert_unique(const_iterator __f, const_iterator __l)
{
size_type __n = 0;
kwsys
_stl::distance(__f, __l, __n);
@KWSYS_NAMESPACE@
_stl::distance(__f, __l, __n);
resize(_M_num_elements + __n);
for ( ; __n > 0; --__n, ++__f)
insert_unique_noresize(*__f);
...
...
@@ -575,7 +575,7 @@ public:
void insert_equal(const_iterator __f, const_iterator __l)
{
size_type __n = 0;
kwsys
_stl::distance(__f, __l, __n);
@KWSYS_NAMESPACE@
_stl::distance(__f, __l, __n);
resize(_M_num_elements + __n);
for ( ; __n > 0; --__n, ++__f)
insert_equal_noresize(*__f);
...
...
@@ -617,10 +617,10 @@ public:
return __result;
}
kwsys
_stl::pair<iterator, iterator>
@KWSYS_NAMESPACE@
_stl::pair<iterator, iterator>
equal_range(const key_type& __key);
kwsys
_stl::pair<const_iterator, const_iterator>
@KWSYS_NAMESPACE@
_stl::pair<const_iterator, const_iterator>
equal_range(const key_type& __key) const;
size_type erase(const key_type& __key);
...
...
@@ -782,7 +782,7 @@ inline void swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1,
}
template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
kwsys
_stl::pair<@KWSYS_NAMESPACE@_CXX_DECL_TYPENAME hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator, bool>
@KWSYS_NAMESPACE@
_stl::pair<@KWSYS_NAMESPACE@_CXX_DECL_TYPENAME hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator, bool>
hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
::insert_unique_noresize(const value_type& __obj)
{
...
...
@@ -791,13 +791,13 @@ hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
return
kwsys
_stl::pair<iterator, bool>(iterator(__cur, this), false);
return
@KWSYS_NAMESPACE@
_stl::pair<iterator, bool>(iterator(__cur, this), false);
_Node* __tmp = _M_new_node(__obj);
__tmp->_M_next = __first;
_M_buckets[__n] = __tmp;
++_M_num_elements;
return
kwsys
_stl::pair<iterator, bool>(iterator(__tmp, this), true);
return
@KWSYS_NAMESPACE@
_stl::pair<iterator, bool>(iterator(__tmp, this), true);
}
template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
...
...
@@ -845,11 +845,11 @@ hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::find_or_insert(const value_type& __obj)
}
template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
kwsys
_stl::pair<@KWSYS_NAMESPACE@_CXX_DECL_TYPENAME hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator,
@KWSYS_NAMESPACE@
_stl::pair<@KWSYS_NAMESPACE@_CXX_DECL_TYPENAME hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator,
@KWSYS_NAMESPACE@_CXX_DECL_TYPENAME hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator>
hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::equal_range(const key_type& __key)
{
typedef
kwsys
_stl::pair<iterator, iterator> _Pii;
typedef
@KWSYS_NAMESPACE@
_stl::pair<iterator, iterator> _Pii;
const size_type __n = _M_bkt_num_key(__key);
for (_Node* __first = _M_buckets[__n]; __first; __first = __first->_M_next)
...
...
@@ -867,12 +867,12 @@ hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::equal_range(const key_type& __key)
}
template <class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
kwsys
_stl::pair<@KWSYS_NAMESPACE@_CXX_DECL_TYPENAME hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::const_iterator,
@KWSYS_NAMESPACE@
_stl::pair<@KWSYS_NAMESPACE@_CXX_DECL_TYPENAME hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::const_iterator,
@KWSYS_NAMESPACE@_CXX_DECL_TYPENAME hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::const_iterator>
hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
::equal_range(const key_type& __key) const
{
typedef
kwsys
_stl::pair<const_iterator, const_iterator> _Pii;
typedef
@KWSYS_NAMESPACE@
_stl::pair<const_iterator, const_iterator> _Pii;
const size_type __n = _M_bkt_num_key(__key);
for (const _Node* __first = _M_buckets[__n] ;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment