Slick Sim 0.10.1
Exchange simulator that shadows real venues for risk-free strategy testing
Loading...
Searching...
No Matches
slick::sim::utils::StringViewHash Struct Reference

Transparent hash/equality for maps keyed by fixed_string. More...

#include <utils/fixed_string.hpp>

Collaboration diagram for slick::sim::utils::StringViewHash:

Public Types

using is_transparent = void

Public Member Functions

size_t operator() (std::string_view value) const noexcept

Detailed Description

Transparent hash/equality for maps keyed by fixed_string.

is_transparent is what lets a lookup take a std::string_view (or a bare const char* from a wire field) without materialising the key type first, so the common already-present case costs no construction at all. fixed_string converts to string_view implicitly, so keys hash identically either way.

Definition at line 102 of file fixed_string.hpp.

Member Typedef Documentation

◆ is_transparent

Member Function Documentation

◆ operator()()

size_t slick::sim::utils::StringViewHash::operator() ( std::string_view value) const
inlinenoexcept

Definition at line 104 of file fixed_string.hpp.


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