Sista v3.0.0-alpha.1
Sista is a C++ lightweight OS-agnostic library for terminal animations and videogames
Loading...
Searching...
No Matches
Public Member Functions | List of all members
std::hash< sista::Coordinates > Struct Reference

Specialization of std::hash for sista::Coordinates. More...

#include <coordinates.hpp>

Public Member Functions

std::size_t operator() (const sista::Coordinates &) const noexcept
 

Detailed Description

Specialization of std::hash for sista::Coordinates.

This specialization allows Coordinates to be used as keys in hash-based containers like std::unordered_map and std::unordered_set. The hash function combines the y and x coordinates into a single size_t value.

See also
sista::Coordinates

Member Function Documentation

◆ operator()()

std::size_t std::hash< sista::Coordinates >::operator() ( const sista::Coordinates c) const
noexcept

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