mp_units::utility¶
Tools for authoring representation types and other extensions
Description¶
Stable and supported, but not part of the API proposed for standardization. It holds the concepts, traits, and helpers a representation type needs to work like the library's own, and the representation types the library provides, such as cartesian_vector and uncertain.
static_assert(utility::castable(isq::height, isq::width));
static_assert(!utility::explicitly_convertible(isq::height, isq::width));
Types¶
Type Aliases¶
| Name | Description |
|---|---|
safe_i16 | A safe_int of std::int16_t |
safe_i32 | A safe_int of std::int32_t |
safe_i64 | A safe_int of std::int64_t |
safe_i8 | A safe_int of std::int8_t |
safe_u16 | A safe_int of std::uint16_t |
safe_u32 | A safe_int of std::uint32_t |
safe_u64 | A safe_int of std::uint64_t |
safe_u8 | A safe_int of std::uint8_t |
Enums¶
| Name | Description |
|---|---|
fmt_align | The alignment of a formatted value within its field width |
fmt_arg_id_kind | How a format specification gives a dynamic width or precision |
Functions¶
| Name | Description |
|---|---|
abs | Absolute value of an uncertain value |
acos | Arc cosine of an uncertain value (result in radians) |
asin | Arc sine of an uncertain value (result in radians) |
at_most_one_of | |
atan | Arc tangent of an uncertain value (result in radians) |
atan2 | Two-argument arc tangent (result in radians) |
castable | |
cbrt | Cube root of an uncertain value |
certainly_within | certainly_within overloads |
cos | Cosine of an uncertain value (argument in radians) |
embed | |
equivalent | Tests whether two units are of the same size |
exp | Exponential function of an uncertain value |
explicitly_convertible | |
fold_conversion_uncertainty | Adds the uncertainty of a unit conversion factor to the value |
get | |
handle_dynamic_spec | |
implicitly_convertible | |
inner_product | |
interconvertible | |
log | Natural logarithm of an uncertain value |
log10 | Common (base-10) logarithm of an uncertain value |
log2 | Binary (base-2) logarithm of an uncertain value |
magnitude | |
measurement_of | Returns a measured constant as a quantity with an uncertain representation |
metrologically_compatible | metrologically_compatible overloads |
norm | |
operator% | Modulus operators |
operator* | Multiplication operators |
operator+ | Addition of two uncertain values |
operator- | Subtraction of two uncertain values |
operator/ | Division operators |
operator>> | Right shift operators |
parse_align | |
parse_dynamic_spec | |
parse_fill_align_width | |
parse_nonnegative_int | |
possibly_within | possibly_within overloads |
pow | Power function with runtime exponent |
project | |
scalar_product | |
sin | Sine of an uncertain value (argument in radians) |
sqrt | Square root of an uncertain value |
tan | Tangent of an uncertain value (argument in radians) |
tensor_product | |
unit_vector | |
value_fits_in | Is value still representable in To after truncation? |
vector_product | |
write_padded | Writes a string to an output iterator with fill/align/width padding. |
operator<< | Stream insertion operators |
operator== | Equality operators |
operator<=> | Three-way comparison operators |
Variables¶
| Name | Description |
|---|---|
radian_of | Customization point: the unit of one radian for an angle quantity kind |
unspecified | The default of a customization point that has no usable default |
Concepts¶
| Name | Description |
|---|---|
Complex | A complex-field representation type. |
ComplexScalar | A complex scalar: complex field with real()/imag()/modulus(). |
ConstraintPolicy | |
OverflowPolicy | |
Real | A real-field representation type. |
RealScalar | A real scalar (tensor order 0): real field, totally ordered, self-scalable. |
Scalar | A scalar (real or complex, tensor order 0) - the element type a vector/tensor is built from. |
Tensor | A second-order tensor (or a lower-order type filling its slot). |
Vector | A vector (a scalar, or a magnitude-bearing tensor-order-1 type). |
specified | Satisfied when a customization point has been given a value (i.e. is not unspecified). |