Skip to content

type_template base_unit

kwikius edited this page Jul 28, 2020 · 24 revisions

| Home | Concepts | Types |

Signature

base_unit<base_quantity Qb, measurement_system Sm>

Header

#include <pqs/type_templates/base_unit.hpp>

Description

A model of unit which combines 1 a base_quantity and a measurement_system

Example

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 : ƒƫ

Notation

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 >

Requires

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

Provides

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>

Notes

Clone this wiki locally