summaryrefslogtreecommitdiffstats
path: root/Bachelor/Prog2/SortedList2/Compare.h
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Bachelor/Prog2/SortedList2/Compare.h
downloadStudium-master.tar.gz
Studium-master.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Bachelor/Prog2/SortedList2/Compare.h')
-rw-r--r--Bachelor/Prog2/SortedList2/Compare.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/Bachelor/Prog2/SortedList2/Compare.h b/Bachelor/Prog2/SortedList2/Compare.h
new file mode 100644
index 0000000..336cf08
--- /dev/null
+++ b/Bachelor/Prog2/SortedList2/Compare.h
@@ -0,0 +1,20 @@
+// Function-object to compare two objects.
+// This template needs operator<() for objects of type T, but it is possible to
+// specialize it for any given type so that this template is not used.
+// Author: U.Breymann / H.P.Weber
+// Date: 05.05.05
+
+#ifndef COMPARE_H
+#define COMPARE_H
+
+template<class T>
+class Compare {
+public:
+ bool operator()( const T& a, const T& b ) const
+ {
+ return a < b;
+ }
+};
+
+#endif
+