summaryrefslogtreecommitdiffstats
path: root/Bachelor/Prog2/SortedList2/Compare.h
blob: 336cf08ed7ef03b61dd6a06f078a2ec07cd0c033 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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