qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
std::hash< qb::jsonb > Struct Reference

Specialization of std::hash for qb::jsonb. More...

#include <json.h>

Public Member Functions

std::size_t operator() (const qb::jsonb &j) const noexcept
 Calculates the hash value for a qb::jsonb object.

Detailed Description

Specialization of std::hash for qb::jsonb.

Allows qb::jsonb objects to be used as keys in std::unordered_map and std::unordered_set. The hash is computed based on the string dump of the JSON object.

Member Function Documentation

◆ operator()()

std::size_t std::hash< qb::jsonb >::operator() ( const qb::jsonb & j) const
inlinenoexcept

Calculates the hash value for a qb::jsonb object.

Parameters
jThe qb::jsonb object to hash.
Returns
The computed hash value.