Blender V5.3
blender::DefaultHash< UString > Struct Reference

#include <BLI_ustring.hh>

Public Member Functions

uint64_t operator() (const UString &value) const
constexpr uint64_t operator() (const StringRef value) const

Detailed Description

Define DefaultHash for UString keys so that it uses the cached hash on ustrings but also supports hashing arbitrary (non-unique) strings in the same way.

Note: The string hashes produced here are different from e.g. DefaultHash<StringRef>. That is fine though. The only requirement is that all hashes defined in this template specialization are compatible with each other.

Definition at line 134 of file BLI_ustring.hh.

Member Function Documentation

◆ operator()() [1/2]

uint64_t blender::DefaultHash< UString >::operator() ( const StringRef value) const
inlineconstexpr

Definition at line 140 of file BLI_ustring.hh.

References blender::get_default_hash().

◆ operator()() [2/2]

uint64_t blender::DefaultHash< UString >::operator() ( const UString & value) const
inline

Definition at line 135 of file BLI_ustring.hh.

References blender::UString::hash().


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