-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathunits.symbols.cppm
52 lines (43 loc) · 1.54 KB
/
units.symbols.cppm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* Contains the type definitions for the symbols that represents a physical quantity
*/
export module physics.quantities:units.symbols;
export namespace zero::physics {
template<typename T>
struct unit_symbol {
using symbol = T;
};
template<typename T>
concept Symbol = requires {
typename T::symbol;
};
/* ------------------------- Symbols for Units ------------------------- */
/* ----- Symbols for represent dimensionless units ----- */
struct unit_type: unit_symbol<unit_type> {};
/* ----- Symbols related with the dimension of Mass ----- */
struct kg: unit_symbol<kg> {};
struct hg: unit_symbol<hg> {};
struct dag: unit_symbol<dag> {};
struct g: unit_symbol<g> {};
struct dg: unit_symbol<dg> {};
struct cg: unit_symbol<cg> {};
struct mg: unit_symbol<mg> {};
struct ng: unit_symbol<ng> {};
struct pg: unit_symbol<pg> {};
/* ----- Symbols related with the dimension of Length ----- */
struct km: unit_symbol<km> {};
struct hm: unit_symbol<hm> {};
struct dam: unit_symbol<dam> {};
struct m: unit_symbol<m> {};
struct dm: unit_symbol<dm> {};
struct cm: unit_symbol<cm> {};
struct mm: unit_symbol<mm> {};
/* ----- Symbols related with the dimension of Length ----- */
struct d: unit_symbol<d> {};
struct h: unit_symbol<h> {};
struct min: unit_symbol<min> {};
struct s: unit_symbol<s> {};
struct ms: unit_symbol<ms> {};
/* ----- Symbols related with the dimension of Length ----- */
struct A: unit_symbol<A> {};
}