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

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

#include <timestamp.h>

Public Member Functions

size_t operator() (const qb::TimePoint &time_point) const noexcept
 Hash function operator for TimePoint.

Detailed Description

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

This hash specialization enables TimePoint objects to be used as keys in unordered associative containers like std::unordered_set and std::unordered_map. The hash is computed from the internal nanoseconds-since-epoch count.

Member Function Documentation

◆ operator()()

size_t std::hash< qb::TimePoint >::operator() ( const qb::TimePoint & time_point) const
inlinenoexcept

Hash function operator for TimePoint.

Parameters
time_pointThe TimePoint to hash
Returns
Hash value based on the time point's nanosecond count