Skip to content

v3.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 17 Jun 08:13
· 1 commit to main since this release
477b6ca

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.