dimval 0.2.0
Modern C++23 header-only library of dimensional values (units, measures, ranges)
Loading...
Searching...
No Matches
base.hpp File Reference

CRTP bases that turn unit/measure tag structs into self-describing types. More...

#include <dimval/descriptor.hpp>
#include <commons/color.hpp>
#include <commons/icon.hpp>
#include <optional>
#include <string_view>
Include dependency graph for base.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dimval::UnitTag
 Marker base — concept detection picks up any type that derives from this. More...
 
struct  dimval::MeasureTag
 Marker base — concept detection picks up any type that derives from this. More...
 
struct  dimval::UnitBase< Self >
 CRTP base for unit tags. More...
 
struct  dimval::MeasureBase< Self, BaseUnit >
 CRTP base for measure tags. More...
 

Detailed Description

CRTP bases that turn unit/measure tag structs into self-describing types.

Each unit/measure struct inherits from UnitBase / MeasureBase and publishes its metadata as static constexpr members; the base synthesises the runtime descriptor from those members.