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

Concept: UnitTraits<E> declares an optional static constexpr QuantityBounds bounds(E) — the pre-decode validation seam a field's unit opts into. A unit enum with no bounds() simply has none: every value its precision allows is accepted, unchanged from before this feature existed. E is the application's unit enum type. More...

#include <quantity.hpp>

Concept definition

template<typename E>
concept HasUnitBounds = requires(E unit) {
{ UnitTraits<E>::bounds(unit) } -> std::convertible_to<QuantityBounds>;
}
Concept: UnitTraits<E> declares an optional static constexpr QuantityBounds bounds(E) — the pre-decod...
Definition quantity.hpp:294
Customisation point: the application specialises this for its unit enum, returning a UnitMeta per enu...
Definition quantity.hpp:274

Detailed Description

Concept: UnitTraits<E> declares an optional static constexpr QuantityBounds bounds(E) — the pre-decode validation seam a field's unit opts into. A unit enum with no bounds() simply has none: every value its precision allows is accepted, unchanged from before this feature existed. E is the application's unit enum type.

Definition at line 294 of file quantity.hpp.