CnC
Public Member Functions | List of all members
cnc_tag_hash_compare< T > Struct Template Reference

Provides hash and equality operators for hashing as used by item_collections. More...

Inherits cnc_hash< T >, and cnc_equal< T >.

Public Member Functions

size_t hash (const T &x) const
 
bool equal (const T &x, const T &y) const
 

Detailed Description

template<class T>
struct cnc_tag_hash_compare< T >

Provides hash and equality operators for hashing as used by item_collections.

It is recommended to specilialize cnc_hash and/or cnc_equal rather than cnc_tag_hash_compare

Definition at line 186 of file cnc_tag_hash_compare.h.

Member Function Documentation

◆ equal()

bool equal ( const T &  x,
const T &  y 
) const
inline
Returns
true if a equals b, false otherwise

Definition at line 194 of file cnc_tag_hash_compare.h.

195  {
196  return cnc_equal< T >::operator()( x, y );
197  }
Provides equality operators for hashing.

◆ hash()

size_t hash ( const T &  x) const
inline
Returns
a unique integer for the given tag

Definition at line 189 of file cnc_tag_hash_compare.h.

190  {
191  return cnc_hash< T >::operator()( x );
192  }
Provides hash operators for hashing.

The documentation for this struct was generated from the following file: