xo-unit: docs: + example programs
This commit is contained in:
parent
d9868870e4
commit
0d9fd75b0c
8 changed files with 103 additions and 0 deletions
19
example/ex3/ex3.cpp
Normal file
19
example/ex3/ex3.cpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/** @file ex3.cpp **/
|
||||
|
||||
#include "xo/unit/quantity.hpp"
|
||||
#include <iostream>
|
||||
|
||||
int
|
||||
main () {
|
||||
namespace u = xo::obs::units;
|
||||
namespace qty = xo::obs::qty;
|
||||
using xo::obs::quantity;
|
||||
using namespace std;
|
||||
|
||||
auto t1 = qty::milliseconds(1);
|
||||
auto t2 = qty::minutes(1);
|
||||
|
||||
cerr << "t1: " << t1 << ", t2: " << t2 << ", t1*t2: " << t1*t2 << endl;
|
||||
}
|
||||
|
||||
/** end ex3.cpp **/
|
||||
Loading…
Add table
Add a link
Reference in a new issue