Loading...
Searching...
No Matches
hash.h File Reference
+ Include dependency graph for hash.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class T >
constexpr bool VtIsHashable ()
 A constexpr function that returns true if T is hashable via VtHashValue(), false otherwise.
 
template<class T >
size_t VtHashValue (T const &val)
 Compute a hash code for val by invoking TfHash()(val) or when not possible issue a coding error and return 0.
 

Function Documentation

◆ VtHashValue()

size_t VtHashValue ( T const &  val)

Compute a hash code for val by invoking TfHash()(val) or when not possible issue a coding error and return 0.

Definition at line 66 of file hash.h.

◆ VtIsHashable()

constexpr bool VtIsHashable ( )
constexpr

A constexpr function that returns true if T is hashable via VtHashValue(), false otherwise.

This is true if we can invoke TfHash()() on a T instance.

Definition at line 59 of file hash.h.