Template Class MemCmp< std::vector< KeyTy > >¶
- Defined in File compare_and_hash_utils.h
Class Documentation¶
-
template <typename KeyTy>
template<>
classMemCmp
<std::vector<KeyTy>>¶ Comparison functor specialized for std::vector.
This functor compares the content of two std::vector.
Typical Usage:
struct A { int a, b; }; void fn(std::vector<A> &value1, std::vector<A> & value2) { if (!MemCmp()(&value1, &value2)) { // they are equal so do something } else { // do sothing different } }
- Return
- false if first == second, true otherwise.
- Template Parameters
KeyTy
: The type of the two keys to compare.
- Parameters
first
: The first std::vector to be comparedsecond
: The second std::vector to be compared
Public Functions
-
bool
operator()
(const std::vector<KeyTy> *first, const std::vector<KeyTy> *sec) const¶