wuzp
Wrong Unit? Zero Points! Compile-time checks for units, coordinate systems and points vs. vectors.
Loading...
Searching...
No Matches
wuzp::UnitSystem Concept Reference

The units of a units backend, e.g. AccessUnits<AccessImplementation<double>>: the base and derived units that the core and its aliases use, e.g. Length and Force, which are consistent with the arithmetic traits of the backend, Product, Division, Power (with rational exponents), Inverse and Identity, e.g. Velocity is Length divided by Time, and also AngularVelocity times Length, for the transport formulas of rigid body kinematics, e.g. w x r. More...

#include <wuzp/core/concepts.hpp>

Concept definition

template<typename UnitsT_>
concept UnitSystem = requires {
typename UnitsT_::Dimensionless;
typename UnitsT_::Angle;
typename UnitsT_::Length;
typename UnitsT_::Mass;
typename UnitsT_::Time;
typename UnitsT_::Area;
typename UnitsT_::Volume;
typename UnitsT_::Velocity;
typename UnitsT_::Acceleration;
typename UnitsT_::Frequency;
typename UnitsT_::AngularVelocity;
typename UnitsT_::AngularAcceleration;
typename UnitsT_::Force;
typename UnitsT_::Energy;
typename UnitsT_::Torque;
} && internal::ConsistentUnits<UnitsT_>
The units of a units backend, e.g. AccessUnits<AccessImplementation<double>>: the base and derived un...
Definition concepts.hpp:409

Detailed Description

The units of a units backend, e.g. AccessUnits<AccessImplementation<double>>: the base and derived units that the core and its aliases use, e.g. Length and Force, which are consistent with the arithmetic traits of the backend, Product, Division, Power (with rational exponents), Inverse and Identity, e.g. Velocity is Length divided by Time, and also AngularVelocity times Length, for the transport formulas of rigid body kinematics, e.g. w x r.

The core defines the sum and the difference of units, and compares units by their types, so equal units must have the same type, however they are computed, e.g. Torque and Energy. The backend specializes AccessUnits<AccessImplementation<ValueT_>> for every arithmetic value type. A backend checks it in its tests, e.g. static_assert(wuzp::UnitSystem<wuzp::AccessUnits<wuzp::AccessImplementation<double>>>);.

Definition at line 409 of file concepts.hpp.