diff options
author | KWSys Robot <kwrobot@kitware.com> | 2015-08-28 18:50:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-02 14:23:14 (GMT) |
commit | 1b79433a6d7cdd1da1a0af74240f2299c78e4112 (patch) | |
tree | 7d6ca208083a5f740d8631d973facf6ebdf2e1b7 /hash_map.hxx.in | |
parent | ca96be228345d93f51cb4edbd0428b709f529b84 (diff) | |
download | CMake-1b79433a6d7cdd1da1a0af74240f2299c78e4112.zip CMake-1b79433a6d7cdd1da1a0af74240f2299c78e4112.tar.gz CMake-1b79433a6d7cdd1da1a0af74240f2299c78e4112.tar.bz2 |
KWSys 2015-08-28 (dc3fdd7f)
Extract upstream KWSys using the following shell commands.
$ git archive --prefix=upstream-kwsys/ dc3fdd7f | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' cdaf522c..dc3fdd7f
Brad King (9):
15a16826 Remove include <kwsys/ios/*> and kwsys_ios:: compatibility layer
a5799c17 Remove unused KWSYS_IOS_USE_{SSTREAM,STRSTREAM_H,STRSTREA_H} checks
198957cf Remove unused KWSYS_IOS_USE_SSTREAM check
24d2b60e Remove support for pre-C++98 streams
2a581c30 Remove support for pre-C++98 std::string missing operators
5f3fd465 Remove support for pre-C++98 STL
cded1574 Remove support for pre-C++98 STL from hash_map and hash_set
f130a3ab Remove kwsys/cstddef compatibility header
dc3fdd7f Remove support for pre-C++98 template capabilities
Diffstat (limited to 'hash_map.hxx.in')
-rw-r--r-- | hash_map.hxx.in | 124 |
1 files changed, 19 insertions, 105 deletions
diff --git a/hash_map.hxx.in b/hash_map.hxx.in index 6d4379d..60c7086 100644 --- a/hash_map.hxx.in +++ b/hash_map.hxx.in @@ -39,7 +39,7 @@ #include <@KWSYS_NAMESPACE@/hashtable.hxx> #include <@KWSYS_NAMESPACE@/hash_fun.hxx> -#include <@KWSYS_NAMESPACE@/stl/functional> // equal_to +#include <functional> // equal_to #if defined(_MSC_VER) # pragma warning (push) @@ -58,9 +58,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_NAMESPACE@_stl::unary_function<@KWSYS_NAMESPACE@_stl::pair<T1, T2>, T1> + public std::unary_function<std::pair<T1, T2>, T1> { - const T1& operator()(const @KWSYS_NAMESPACE@_stl::pair<T1, T2>& __x) const + const T1& operator()(const std::pair<T1, T2>& __x) const { return __x.first; } }; @@ -68,8 +68,8 @@ struct hash_select1st: template <class _Key, class _Tp, class _HashFcn = hash<_Key>, - class _EqualKey = @KWSYS_NAMESPACE@_stl::equal_to<_Key>, - class _Alloc = @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(char) > + class _EqualKey = std::equal_to<_Key>, + class _Alloc = std::allocator<char> > class hash_map; template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc> @@ -81,7 +81,7 @@ template <class _Key, class _Tp, class _HashFcn, class _EqualKey, class hash_map { private: - typedef hashtable<@KWSYS_NAMESPACE@_stl::pair<const _Key,_Tp>,_Key,_HashFcn, + typedef hashtable<std::pair<const _Key,_Tp>,_Key,_HashFcn, hash_select1st<const _Key,_Tp>,_EqualKey,_Alloc> _Ht; _Ht _M_ht; @@ -119,7 +119,6 @@ public: const allocator_type& __a = allocator_type()) : _M_ht(__n, __hf, __eql, __a) {} -#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES template <class _InputIterator> hash_map(_InputIterator __f, _InputIterator __l) : _M_ht(100, hasher(), key_equal(), allocator_type()) @@ -140,48 +139,14 @@ public: : _M_ht(__n, __hf, __eql, __a) { _M_ht.insert_unique(__f, __l); } -#else - hash_map(const value_type* __f, const value_type* __l) - : _M_ht(100, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_unique(__f, __l); } - hash_map(const value_type* __f, const value_type* __l, size_type __n) - : _M_ht(__n, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_unique(__f, __l); } - hash_map(const value_type* __f, const value_type* __l, size_type __n, - const hasher& __hf) - : _M_ht(__n, __hf, key_equal(), allocator_type()) - { _M_ht.insert_unique(__f, __l); } - hash_map(const value_type* __f, const value_type* __l, size_type __n, - const hasher& __hf, const key_equal& __eql, - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_unique(__f, __l); } - - hash_map(const_iterator __f, const_iterator __l) - : _M_ht(100, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_unique(__f, __l); } - hash_map(const_iterator __f, const_iterator __l, size_type __n) - : _M_ht(__n, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_unique(__f, __l); } - hash_map(const_iterator __f, const_iterator __l, size_type __n, - const hasher& __hf) - : _M_ht(__n, __hf, key_equal(), allocator_type()) - { _M_ht.insert_unique(__f, __l); } - hash_map(const_iterator __f, const_iterator __l, size_type __n, - const hasher& __hf, const key_equal& __eql, - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_unique(__f, __l); } -#endif - public: size_type size() const { return _M_ht.size(); } size_type max_size() const { return _M_ht.max_size(); } bool empty() const { return _M_ht.empty(); } void swap(hash_map& __hs) { _M_ht.swap(__hs._M_ht); } - friend bool operator==@KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS(const hash_map&, - const hash_map&); + friend bool operator==<>(const hash_map&, + const hash_map&); iterator begin() { return _M_ht.begin(); } iterator end() { return _M_ht.end(); } @@ -189,20 +154,12 @@ public: const_iterator end() const { return _M_ht.end(); } public: - @KWSYS_NAMESPACE@_stl::pair<iterator,bool> insert(const value_type& __obj) + std::pair<iterator,bool> insert(const value_type& __obj) { return _M_ht.insert_unique(__obj); } -#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES template <class _InputIterator> void insert(_InputIterator __f, _InputIterator __l) { _M_ht.insert_unique(__f,__l); } -#else - void insert(const value_type* __f, const value_type* __l) { - _M_ht.insert_unique(__f,__l); - } - void insert(const_iterator __f, const_iterator __l) - { _M_ht.insert_unique(__f, __l); } -#endif - @KWSYS_NAMESPACE@_stl::pair<iterator,bool> insert_noresize(const value_type& __obj) + std::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); } @@ -215,9 +172,9 @@ public: size_type count(const key_type& __key) const { return _M_ht.count(__key); } - @KWSYS_NAMESPACE@_stl::pair<iterator, iterator> equal_range(const key_type& __key) + std::pair<iterator, iterator> equal_range(const key_type& __key) { return _M_ht.equal_range(__key); } - @KWSYS_NAMESPACE@_stl::pair<const_iterator, const_iterator> + std::pair<const_iterator, const_iterator> equal_range(const key_type& __key) const { return _M_ht.equal_range(__key); } @@ -260,8 +217,8 @@ swap(hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1, template <class _Key, class _Tp, class _HashFcn = hash<_Key>, - class _EqualKey = @KWSYS_NAMESPACE@_stl::equal_to<_Key>, - class _Alloc = @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(char) > + class _EqualKey = std::equal_to<_Key>, + class _Alloc = std::allocator<char> > class hash_multimap; template <class _Key, class _Tp, class _HF, class _EqKey, class _Alloc> @@ -274,7 +231,7 @@ template <class _Key, class _Tp, class _HashFcn, class _EqualKey, class hash_multimap { private: - typedef hashtable<@KWSYS_NAMESPACE@_stl::pair<const _Key, _Tp>, _Key, _HashFcn, + typedef hashtable<std::pair<const _Key, _Tp>, _Key, _HashFcn, hash_select1st<const _Key, _Tp>, _EqualKey, _Alloc> _Ht; _Ht _M_ht; @@ -313,7 +270,6 @@ public: const allocator_type& __a = allocator_type()) : _M_ht(__n, __hf, __eql, __a) {} -#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES template <class _InputIterator> hash_multimap(_InputIterator __f, _InputIterator __l) : _M_ht(100, hasher(), key_equal(), allocator_type()) @@ -334,48 +290,14 @@ public: : _M_ht(__n, __hf, __eql, __a) { _M_ht.insert_equal(__f, __l); } -#else - hash_multimap(const value_type* __f, const value_type* __l) - : _M_ht(100, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_equal(__f, __l); } - hash_multimap(const value_type* __f, const value_type* __l, size_type __n) - : _M_ht(__n, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_equal(__f, __l); } - hash_multimap(const value_type* __f, const value_type* __l, size_type __n, - const hasher& __hf) - : _M_ht(__n, __hf, key_equal(), allocator_type()) - { _M_ht.insert_equal(__f, __l); } - hash_multimap(const value_type* __f, const value_type* __l, size_type __n, - const hasher& __hf, const key_equal& __eql, - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_equal(__f, __l); } - - hash_multimap(const_iterator __f, const_iterator __l) - : _M_ht(100, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_equal(__f, __l); } - hash_multimap(const_iterator __f, const_iterator __l, size_type __n) - : _M_ht(__n, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_equal(__f, __l); } - hash_multimap(const_iterator __f, const_iterator __l, size_type __n, - const hasher& __hf) - : _M_ht(__n, __hf, key_equal(), allocator_type()) - { _M_ht.insert_equal(__f, __l); } - hash_multimap(const_iterator __f, const_iterator __l, size_type __n, - const hasher& __hf, const key_equal& __eql, - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_equal(__f, __l); } -#endif - public: size_type size() const { return _M_ht.size(); } size_type max_size() const { return _M_ht.max_size(); } bool empty() const { return _M_ht.empty(); } void swap(hash_multimap& __hs) { _M_ht.swap(__hs._M_ht); } - friend bool operator==@KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS(const hash_multimap&, - const hash_multimap&); + friend bool operator==<>(const hash_multimap&, + const hash_multimap&); iterator begin() { return _M_ht.begin(); } iterator end() { return _M_ht.end(); } @@ -385,17 +307,9 @@ public: public: iterator insert(const value_type& __obj) { return _M_ht.insert_equal(__obj); } -#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES template <class _InputIterator> void insert(_InputIterator __f, _InputIterator __l) { _M_ht.insert_equal(__f,__l); } -#else - void insert(const value_type* __f, const value_type* __l) { - _M_ht.insert_equal(__f,__l); - } - void insert(const_iterator __f, const_iterator __l) - { _M_ht.insert_equal(__f, __l); } -#endif iterator insert_noresize(const value_type& __obj) { return _M_ht.insert_equal_noresize(__obj); } @@ -405,9 +319,9 @@ public: size_type count(const key_type& __key) const { return _M_ht.count(__key); } - @KWSYS_NAMESPACE@_stl::pair<iterator, iterator> equal_range(const key_type& __key) + std::pair<iterator, iterator> equal_range(const key_type& __key) { return _M_ht.equal_range(__key); } - @KWSYS_NAMESPACE@_stl::pair<const_iterator, const_iterator> + std::pair<const_iterator, const_iterator> equal_range(const key_type& __key) const { return _M_ht.equal_range(__key); } |