JSON Voorhees
Killer JSON for C++
std::hash< jsonv::value > Struct Template Reference

Explicit specialization of std::hash for jsonv::value types so you can store a value in an unordered container. More...

#include <jsonv/value.hpp>

Public Member Functions

std::size_t operator() (const jsonv::value &val) const noexcept
 

Detailed Description

template<>
struct std::hash< jsonv::value >

Explicit specialization of std::hash for jsonv::value types so you can store a value in an unordered container.

Hashing results depend on the kind for the provided value – most kinds directly use the hasher for their kind (hashing a jsonv::value for integer 5 should have the same hash value as directly hashing the same integer). For aggregate kinds array and object, hashing visits every sub-element recursively. This might be expensive, but is required when storing multiple values with similar layouts in the a set (which is the most common use case).

Definition at line 1114 of file value.hpp.


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