mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
This change replaces all include guards in the `src/` and `include/` directories by `#pragma once`.
27 lines
477 B
C++
27 lines
477 B
C++
#pragma once
|
|
|
|
#include <xrpl/beast/hash/hash_append.h>
|
|
#include <xrpl/beast/hash/xxhasher.h>
|
|
|
|
namespace beast {
|
|
|
|
// Universal hash function
|
|
template <class Hasher = xxhasher>
|
|
struct uhash
|
|
{
|
|
uhash() = default;
|
|
|
|
using result_type = typename Hasher::result_type;
|
|
|
|
template <class T>
|
|
result_type
|
|
operator()(T const& t) const noexcept
|
|
{
|
|
Hasher h;
|
|
hash_append(h, t);
|
|
return static_cast<result_type>(h);
|
|
}
|
|
};
|
|
|
|
} // namespace beast
|