You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Precise integer time (opt-in utl/time_point.hpp): TimeDuration and TimeStamp, nanosecond-native int64 wrappers over Time<int64_t> with
affine semantics — TimeStamp - TimeStamp yields a TimeDuration, TimeStamp +/- TimeDuration yields a TimeStamp, and TimeStamp + TimeStamp
is deleted. to_time() bridges to the dimensional Time<double> (seconds).
The floating-point unit machinery is untouched.
std::chrono interop (opt-in utl/chrono.hpp): to_duration / to_timestamp
convert from std::chrono::duration / time_point, and overloads of to_chrono convert TimeDuration / TimeStamp back. Kept separate so <chrono> is only included on demand.
Readable dimension-mismatch diagnostics: adding, subtracting or comparing
quantities of different dimensions now fails with a clear static_assert
message (e.g. "utl: cannot add quantities of different dimensions") instead of
an overload-resolution wall of "no matching operator" notes.
Single-header amalgamation: single_include/utl/utl.hpp, generated from the
multi-header tree by tools/amalgamate.py and kept in sync by CI, for
zero-setup drop-in use. (The opt-in utl/io.hpp is not amalgamated.)
Five more coherent derived units, each with a from-constituents constructor
and an automatic result-type mapping: Vergence (1/m, diopter), Density (kg/m³), CurrentDensity (A/m²), Concentration (mol/m³) and Luminance (cd/m²). Luminance (cd/m²) is distinct from Illuminance
(lm/m²) thanks to the angle dimension.