5
Quantities library
[qties]
5.8
Types
[qty.types]
5.8.1
General
[qty.types.general]
1
#
A
quantity type
is a type
Q
that is a specialization of
quantity
or
quantity_
point
.
Q
represents a quantity (
IEC 60050, 112-01-01
) with
Q
::
rep
as its number and
Q
::
reference
as its reference
.
Q
is a structural type (
N4971, [temp.param]
) if
Q
::
rep
is a structural type
.
2
#
Each class template defined in subclause [qty.
types] has data members and special members specified below, and has no base classes or members other than those specified
.
5.8.2
Class template
quantity
[qty.type]
namespace
mp_units
{
export
template
<
some_
reference
auto
R,
representation_
of
<
get_quantity_spec
(
R
)
.
character
>
Rep
=
double
>
class
quantity
{
unspecified
}
;
}
Let
Q
be a specialization of
quantity
.
If
Rep
is a scalar,
Q
represents a scalar quantity (
IEC 60050, 102-02-19
)
.
If
Rep
is a vector,
Q
represents a vector (
IEC 60050, 102-03-04
)
.
5.8.3
Class template
quantity_
point
[qty.point.type]
namespace
mp_units
{
export
template
<
unspecified
>
class
quantity_point
{
unspecified
}
;
}
A
quantity point type
is a specialization of
quantity_
point
.
Let
Q
be a quantity point type
.
Q
::
point_
origin
represents the origin point of a position vector (
IEC 60050, 102-03-15
)
.
If
Rep
is a scalar,
Q
represents the scalar quantity (
IEC 60050, 102-02-19
) of a position vector
.
If
Rep
is a vector,
Q
represents a position vector
.