浏览代码

KWSys 2017-12-07 (4aee0036)

Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit 4aee00361a2a38b99911318db84551eed8d3fcfc (master).

Upstream Shortlog
-----------------

Brad King (1):
      09724ac8 hashtable: Avoid use of std::unary_function
KWSys Upstream 8 年之前
父节点
当前提交
5b1c84b449
共有 3 个文件被更改,包括 8 次插入9 次删除
  1. 1 1
      hash_map.hxx.in
  2. 1 1
      hash_set.hxx.in
  3. 6 7
      hashtable.hxx.in

+ 1 - 1
hash_map.hxx.in

@@ -49,7 +49,7 @@ namespace @KWSYS_NAMESPACE@ {
 
 
 // select1st is an extension: it is not part of the standard.
 // select1st is an extension: it is not part of the standard.
 template <class T1, class T2>
 template <class T1, class T2>
-struct hash_select1st : public std::unary_function<std::pair<T1, T2>, T1>
+struct hash_select1st
 {
 {
   const T1& operator()(const std::pair<T1, T2>& __x) const
   const T1& operator()(const std::pair<T1, T2>& __x) const
   {
   {

+ 1 - 1
hash_set.hxx.in

@@ -49,7 +49,7 @@ namespace @KWSYS_NAMESPACE@ {
 
 
 // identity is an extension: it is not part of the standard.
 // identity is an extension: it is not part of the standard.
 template <class _Tp>
 template <class _Tp>
-struct _Identity : public std::unary_function<_Tp, _Tp>
+struct _Identity
 {
 {
   const _Tp& operator()(const _Tp& __x) const { return __x; }
   const _Tp& operator()(const _Tp& __x) const { return __x; }
 };
 };

+ 6 - 7
hashtable.hxx.in

@@ -35,13 +35,12 @@
 
 
 #include <@KWSYS_NAMESPACE@/Configure.hxx>
 #include <@KWSYS_NAMESPACE@/Configure.hxx>
 
 
-#include <algorithm>  // lower_bound
-#include <functional> // unary_function
-#include <iterator>   // iterator_traits
-#include <memory>     // allocator
-#include <stddef.h>   // size_t
-#include <utility>    // pair
-#include <vector>     // vector
+#include <algorithm> // lower_bound
+#include <iterator>  // iterator_traits
+#include <memory>    // allocator
+#include <stddef.h>  // size_t
+#include <utility>   // pair
+#include <vector>    // vector
 
 
 #if defined(_MSC_VER)
 #if defined(_MSC_VER)
 #pragma warning(push)
 #pragma warning(push)