This is a project for the course "Programming paradigms".
Paradigm: functional, generic;
Language: C++;
The general idea for the project:
We want to define a generic type "compound_unit" which would be used for the representation of different measurment units.
For example: compound_unit<meter<1>, second<-2>>
would represent m/s^2.
When we would multiply values, for example:
32m/s^2 * 5s
we should get a value with the type m/s, namely <meter<1>, second<-1>>
.
The program is compiled using the following command:
g++ -std=c++2a -o demo demo.cpp
,
and you run the program with:
./demo
.
Maja Cekić maja-cekic
Aleksandar Nikolić aleksandar-nikolic