-
Notifications
You must be signed in to change notification settings - Fork 1
type_template base_unit
kwikius edited this page Jul 28, 2020
·
24 revisions
base_unit<base_quantity Qb, measurement_system Sm>
#include <pqs/type_templates/base_unit.hpp>
A model of unit which combines 1 a base_quantity and a measurement_system
namespace pqs::imperial::length_unit{
struct ft : base_unit<
base_length,imperial_measurement_system
>{};
}
int main()
{
std::cout << pqs::imperial::length_unit::ft::name<pqs::charset_utf8> <<'\n';
}
sample output : ƒƫ
typename | model_of | notes |
---|---|---|
Qb | base_quantity | |
Sm | measurement_system | |
Cs | CharSet | character encoding |
Str | basic_fixed_string |
value | type |
---|---|
str | Str |
typename | type_template | notes |
---|---|---|
Ub | base_unit< Qb , Sm > |
type expression | result | notes |
---|---|---|
get_base_unit_symbol< Qb, Sm, Cs> | str | a string representing the base_unit symbol for Ub in the CS encoding |
concept |
---|
unit< Ub > |
type expression | result | notes |
---|---|---|
Ub::name< Cs > | str | string representing the base_unit symbol for Ub. name is initialised by get_base_unit_symbol< Qb, Sm, Cs> |