diff --git a/CMakeLists.txt b/CMakeLists.txt index 40c6f52d3cbeb08c2bd2e2fd095f4868933f71c0..84010d8b4c241642e0e11c6907d5ca7b9e3e8d17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -342,15 +342,6 @@ ENDIF() # capabilities and parent project's request. Enforce 0/1 as only # possible values for configuration into Configure.hxx. -KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS - "Checking whether \"<>\" is needed for template friends" INVERT) -KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_MEMBER_TEMPLATES - "Checking for member template support" DIRECT) -KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_FULL_SPECIALIZATION - "Checking for standard template specialization syntax" DIRECT) -KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP - "Checking whether argument dependent lookup is supported" DIRECT) - IF(UNIX) KWSYS_PLATFORM_CXX_TEST(KWSYS_STAT_HAS_ST_MTIM "Checking whether struct stat has st_mtim member" DIRECT) diff --git a/Configure.hxx.in b/Configure.hxx.in index 16c3282c8237f93d7838d0995ae32b19a28143af..3faf8620e6980ca2c06114a0caaab458f2cbe8c9 100644 --- a/Configure.hxx.in +++ b/Configure.hxx.in @@ -18,39 +18,6 @@ /* Whether wstring is available. */ #define @KWSYS_NAMESPACE@_STL_HAS_WSTRING @KWSYS_STL_HAS_WSTRING@ -/* Whether the compiler supports null template arguments. */ -#define @KWSYS_NAMESPACE@_CXX_HAS_NULL_TEMPLATE_ARGS @KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS@ - -/* Define the null template arguments macro. */ -#if @KWSYS_NAMESPACE@_CXX_HAS_NULL_TEMPLATE_ARGS -# define @KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS <> -#else -# define @KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS -#endif - -/* Whether the compiler supports member templates. */ -#define @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES @KWSYS_CXX_HAS_MEMBER_TEMPLATES@ - -/* Whether the compiler supports argument dependent lookup. */ -#define @KWSYS_NAMESPACE@_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP @KWSYS_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP@ - -/* Whether the compiler supports standard full specialization syntax. */ -#define @KWSYS_NAMESPACE@_CXX_HAS_FULL_SPECIALIZATION @KWSYS_CXX_HAS_FULL_SPECIALIZATION@ - -/* Define the specialization definition macro. */ -#if @KWSYS_NAMESPACE@_CXX_HAS_FULL_SPECIALIZATION -# define @KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION template <> -#else -# define @KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION -#endif - -/* Define typename keyword macro for use in declarations. */ -#if defined(_MSC_VER) && _MSC_VER < 1300 -# define @KWSYS_NAMESPACE@_CXX_DECL_TYPENAME -#else -# define @KWSYS_NAMESPACE@_CXX_DECL_TYPENAME typename -#endif - /* Whether struct stat has the st_mtim member for high resolution times. */ #define @KWSYS_NAMESPACE@_STAT_HAS_ST_MTIM @KWSYS_STAT_HAS_ST_MTIM@ @@ -62,12 +29,6 @@ # endif # define KWSYS_NAME_IS_KWSYS @KWSYS_NAMESPACE@_NAME_IS_KWSYS # define KWSYS_STAT_HAS_ST_MTIM @KWSYS_NAMESPACE@_STAT_HAS_ST_MTIM -# define KWSYS_CXX_NULL_TEMPLATE_ARGS @KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS -# define KWSYS_CXX_HAS_MEMBER_TEMPLATES @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES -# define KWSYS_CXX_HAS_FULL_SPECIALIZATION @KWSYS_NAMESPACE@_CXX_HAS_FULL_SPECIALIZATION -# define KWSYS_CXX_DEFINE_SPECIALIZATION @KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION -# define KWSYS_CXX_DECL_TYPENAME @KWSYS_NAMESPACE@_CXX_DECL_TYPENAME -# define KWSYS_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP @KWSYS_NAMESPACE@_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP # define KWSYS_STL_HAS_WSTRING @KWSYS_NAMESPACE@_STL_HAS_WSTRING #endif diff --git a/hash_fun.hxx.in b/hash_fun.hxx.in index 489b9c94b9fc2fffeca9eafe75071f60b9fd7594..4872b51c7ebdec75461f3144977294151678a469 100644 --- a/hash_fun.hxx.in +++ b/hash_fun.hxx.in @@ -55,90 +55,90 @@ inline size_t _stl_hash_string(const char* __s) return size_t(__h); } -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<char*> { size_t operator()(const char* __s) const { return _stl_hash_string(__s); } }; -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<const char*> { size_t operator()(const char* __s) const { return _stl_hash_string(__s); } }; -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<std::string> { size_t operator()(const std::string & __s) const { return _stl_hash_string(__s.c_str()); } }; #if !defined(__BORLANDC__) -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<const std::string> { size_t operator()(const std::string & __s) const { return _stl_hash_string(__s.c_str()); } }; #endif -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<char> { size_t operator()(char __x) const { return __x; } }; -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<unsigned char> { size_t operator()(unsigned char __x) const { return __x; } }; -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<signed char> { size_t operator()(unsigned char __x) const { return __x; } }; -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<short> { size_t operator()(short __x) const { return __x; } }; -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<unsigned short> { size_t operator()(unsigned short __x) const { return __x; } }; -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<int> { size_t operator()(int __x) const { return __x; } }; -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<unsigned int> { size_t operator()(unsigned int __x) const { return __x; } }; -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<long> { size_t operator()(long __x) const { return __x; } }; -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<unsigned long> { size_t operator()(unsigned long __x) const { return __x; } }; // use long long or __int64 #if @KWSYS_USE_LONG_LONG@ -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<long long> { size_t operator()(long long __x) const { return __x; } }; -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<unsigned long long> { size_t operator()(unsigned long long __x) const { return __x; } }; #elif @KWSYS_USE___INT64@ -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<__int64> { size_t operator()(__int64 __x) const { return __x; } }; -@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION +template <> struct hash<unsigned __int64> { size_t operator()(unsigned __int64 __x) const { return __x; } }; diff --git a/hash_map.hxx.in b/hash_map.hxx.in index 02250905d1aff2e3842afd7fb19aa6135c92f7ed..60c708607ac58ef05129a59a8844b53b8cea8c93 100644 --- a/hash_map.hxx.in +++ b/hash_map.hxx.in @@ -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(); } @@ -191,17 +156,9 @@ public: public: 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 std::pair<iterator,bool> insert_noresize(const value_type& __obj) { return _M_ht.insert_unique_noresize(__obj); } @@ -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); } diff --git a/hash_set.hxx.in b/hash_set.hxx.in index 07f04c4c670c4440f414050cd24ef799e47b8b62..c314979f9ef970a1a0e67b701f9b228de293cf24 100644 --- a/hash_set.hxx.in +++ b/hash_set.hxx.in @@ -116,7 +116,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_set(_InputIterator __f, _InputIterator __l) : _M_ht(100, hasher(), key_equal(), allocator_type()) @@ -136,40 +135,6 @@ public: const allocator_type& __a = allocator_type()) : _M_ht(__n, __hf, __eql, __a) { _M_ht.insert_unique(__f, __l); } -#else - - hash_set(const value_type* __f, const value_type* __l) - : _M_ht(100, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_unique(__f, __l); } - hash_set(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_set(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_set(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_set(const_iterator __f, const_iterator __l) - : _M_ht(100, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_unique(__f, __l); } - hash_set(const_iterator __f, const_iterator __l, size_type __n) - : _M_ht(__n, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_unique(__f, __l); } - hash_set(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_set(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(); } @@ -177,8 +142,8 @@ public: bool empty() const { return _M_ht.empty(); } void swap(hash_set& __hs) { _M_ht.swap(__hs._M_ht); } - friend bool operator==@KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS(const hash_set&, - const hash_set&); + friend bool operator==<>(const hash_set&, + const hash_set&); iterator begin() const { return _M_ht.begin(); } iterator end() const { return _M_ht.end(); } @@ -190,17 +155,9 @@ public: std::pair<_Ht_iterator, bool> __p = _M_ht.insert_unique(__obj); return std::pair<iterator,bool>(__p.first, __p.second); } -#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 std::pair<iterator, bool> insert_noresize(const value_type& __obj) { typedef typename _Ht::iterator _Ht_iterator; @@ -305,7 +262,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_multiset(_InputIterator __f, _InputIterator __l) : _M_ht(100, hasher(), key_equal(), allocator_type()) @@ -325,40 +281,6 @@ public: const allocator_type& __a = allocator_type()) : _M_ht(__n, __hf, __eql, __a) { _M_ht.insert_equal(__f, __l); } -#else - - hash_multiset(const value_type* __f, const value_type* __l) - : _M_ht(100, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_equal(__f, __l); } - hash_multiset(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_multiset(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_multiset(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_multiset(const_iterator __f, const_iterator __l) - : _M_ht(100, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_equal(__f, __l); } - hash_multiset(const_iterator __f, const_iterator __l, size_type __n) - : _M_ht(__n, hasher(), key_equal(), allocator_type()) - { _M_ht.insert_equal(__f, __l); } - hash_multiset(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_multiset(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(); } @@ -366,8 +288,8 @@ public: bool empty() const { return _M_ht.empty(); } void swap(hash_multiset& hs) { _M_ht.swap(hs._M_ht); } - friend bool operator==@KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS(const hash_multiset&, - const hash_multiset&); + friend bool operator==<>(const hash_multiset&, + const hash_multiset&); iterator begin() const { return _M_ht.begin(); } iterator end() const { return _M_ht.end(); } @@ -375,17 +297,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); } diff --git a/hashtable.hxx.in b/hashtable.hxx.in index 97537ceae5830800006a473718b90e023a1f23a4..9a2022657ce0d4678bca715eb6d1f3dfe69337ea 100644 --- a/hashtable.hxx.in +++ b/hashtable.hxx.in @@ -360,8 +360,8 @@ public: const_iterator end() const { return const_iterator(0, this); } - friend bool operator==@KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS(const hashtable&, - const hashtable&); + friend bool operator==<>(const hashtable&, + const hashtable&); public: @@ -393,7 +393,6 @@ public: std::pair<iterator, bool> insert_unique_noresize(const value_type& __obj); iterator insert_equal_noresize(const value_type& __obj); -#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES template <class _InputIterator> void insert_unique(_InputIterator __f, _InputIterator __l) { @@ -446,42 +445,6 @@ public: insert_equal_noresize(*__f); } -#else - void insert_unique(const value_type* __f, const value_type* __l) - { - size_type __n = __l - __f; - resize(_M_num_elements + __n); - for ( ; __n > 0; --__n, ++__f) - insert_unique_noresize(*__f); - } - - void insert_equal(const value_type* __f, const value_type* __l) - { - size_type __n = __l - __f; - resize(_M_num_elements + __n); - for ( ; __n > 0; --__n, ++__f) - insert_equal_noresize(*__f); - } - - void insert_unique(const_iterator __f, const_iterator __l) - { - size_type __n = 0; - std::distance(__f, __l, __n); - resize(_M_num_elements + __n); - for ( ; __n > 0; --__n, ++__f) - insert_unique_noresize(*__f); - } - - void insert_equal(const_iterator __f, const_iterator __l) - { - size_type __n = 0; - std::distance(__f, __l, __n); - resize(_M_num_elements + __n); - for ( ; __n > 0; --__n, ++__f) - insert_equal_noresize(*__f); - } -#endif - reference find_or_insert(const value_type& __obj); iterator find(const key_type& __key) @@ -682,7 +645,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> -std::pair<@KWSYS_NAMESPACE@_CXX_DECL_TYPENAME hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator, bool> +std::pair<typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator, bool> hashtable<_Val,_Key,_HF,_Ex,_Eq,_All> ::insert_unique_noresize(const value_type& __obj) { @@ -745,8 +708,8 @@ 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> -std::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> +std::pair<typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator, + typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator> hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::equal_range(const key_type& __key) { typedef std::pair<iterator, iterator> _Pii; @@ -767,8 +730,8 @@ 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> -std::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> +std::pair<typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::const_iterator, + typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::const_iterator> hashtable<_Val,_Key,_HF,_Ex,_Eq,_All> ::equal_range(const key_type& __key) const { @@ -1020,14 +983,6 @@ void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All> } // namespace @KWSYS_NAMESPACE@ -// Normally the comparison operators should be found in the @KWSYS_NAMESPACE@ -// namespace by argument dependent lookup. For compilers that do not -// support it we must bring them into the global namespace now. -#if !@KWSYS_NAMESPACE@_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP -using @KWSYS_NAMESPACE@::operator==; -using @KWSYS_NAMESPACE@::operator!=; -#endif - // Undo warning suppression. #if defined(__clang__) && defined(__has_warning) # if __has_warning("-Wdeprecated") diff --git a/kwsysPlatformTestsCXX.cxx b/kwsysPlatformTestsCXX.cxx index 857ec4111625a6fac5554a304b16f00fc6b770f7..94579b3f8ddc6bbc4fbace9685595cb5499b7beb 100644 --- a/kwsysPlatformTestsCXX.cxx +++ b/kwsysPlatformTestsCXX.cxx @@ -32,69 +32,6 @@ int main() } #endif -#ifdef TEST_KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS -template <class T> class A; -template <class T> int f(A<T>&); -template <class T> class A -{ -public: - // "friend int f<>(A<T>&)" would conform - friend int f(A<T>&); -private: - int x; -}; - -template <class T> int f(A<T>& a) { return a.x = 0; } -template int f(A<int>&); - -int main() -{ - A<int> a; - return f(a); -} -#endif - -#ifdef TEST_KWSYS_CXX_HAS_MEMBER_TEMPLATES -template <class U> -class A -{ -public: - U u; - A(): u(0) {} - template <class V> V m(V* p) { return *p = u; } -}; - -int main() -{ - A<short> a; - int s = 1; - return a.m(&s); -} -#endif - -#ifdef TEST_KWSYS_CXX_HAS_FULL_SPECIALIZATION -template <class T> struct A {}; -template <> struct A<int*> -{ - static int f() { return 0; } -}; -int main() { return A<int*>::f(); } -#endif - -#ifdef TEST_KWSYS_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP -namespace N -{ - class A {}; - int f(A*) { return 0; } -} -void f(void*); -int main() -{ - N::A* a = 0; - return f(a); -} -#endif - #ifdef TEST_KWSYS_STAT_HAS_ST_MTIM #include <sys/types.h> #include <sys/stat.h>