morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::model::RawModelKey Concept Reference

Key types that are themselves a wire-encodable scalar. More...

#include <model_key.hpp>

Concept definition

template<typename K>
concept RawModelKey =
(std::integral<K> && !std::same_as<std::remove_cv_t<K>, bool>) || std::same_as<std::remove_cv_t<K>, std::string>
Key types that are themselves a wire-encodable scalar.
Definition model_key.hpp:41

Detailed Description

Key types that are themselves a wire-encodable scalar.

Restricted to integral types and std::string because a key must round-trip losslessly through the wire's string encoding and be usable as a map key. bool is excluded: it carries one bit of identity, which is never a meaningful primary key and is far more likely to be a mistake.

Definition at line 41 of file model_key.hpp.