Unit Conversion and Dimensional Analysis Library 3.6.1
A compile-time, header-only C++23 dimensional-analysis library
Loading...
Searching...
No Matches
units::unit_identity Struct Reference

the runtime identity of a quantity's dimension — the set of nonzero base-dimension terms More...

#include <serialization.h>

Collaboration diagram for units::unit_identity:
[legend]

Public Member Functions

bool operator== (const unit_identity &other) const noexcept
 dimension-signature equality

Public Attributes

std::vector< dimension_termterms

Detailed Description

the runtime identity of a quantity's dimension — the set of nonzero base-dimension terms

Backed by a std::vector, so there is NO baked-in ceiling on the number of base dimensions a quantity may compose. The terms are held sorted by hash so equality is order-independent.

Member Function Documentation

◆ operator==()

bool units::unit_identity::operator== ( const unit_identity & other) const
inlinenoexcept

dimension-signature equality

Parameters
[in]otheridentity to compare against
Returns
true iff both carry the same nonzero base-dimension terms (by hash and exponent)

The documentation for this struct was generated from the following file: