CMS 3D CMS Logo

PointerComparator.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_PointerComparator_h
2 #define CommonTools_Utils_PointerComparator_h
3 
15 
16 template<typename C>
18  typedef typename C::first_argument_type first_argument_type;
19  typedef typename C::second_argument_type second_argument_type;
20  bool operator()( const first_argument_type * t1, const second_argument_type * t2 ) const {
21  if ( t1 == 0 || t2 == 0 )
23  << "PointerComparator: passed null pointer.";
24  return cmp( *t1, *t2 );
25  }
26  C cmp;
27 };
28 
29 
30 #endif
bool operator()(const first_argument_type *t1, const second_argument_type *t2) const
C::first_argument_type first_argument_type
C::second_argument_type second_argument_type