diff --git a/example/ex5/CMakeLists.txt b/example/ex5/CMakeLists.txt index d5956051..bd2e4253 100644 --- a/example/ex5/CMakeLists.txt +++ b/example/ex5/CMakeLists.txt @@ -9,6 +9,6 @@ xo_add_executable(${SELF_EXE} ${SELF_SRCS}) # dependencies.. xo_self_headeronly_dependency(${SELF_EXE} xo_unit) -#xo_dependency(${SELF_EXE} reflect) +xo_dependency(${SELF_EXE} xo_flatstring) # end CMakeLists.txt diff --git a/example/ex5/ex5.cpp b/example/ex5/ex5.cpp index 85dad01b..b67e8e84 100644 --- a/example/ex5/ex5.cpp +++ b/example/ex5/ex5.cpp @@ -1,18 +1,19 @@ /** @file ex5.cpp **/ -#include "xo/unit/mpl/quantity.hpp" +#include "xo/unit/quantity.hpp" +#include "xo/unit/quantity_iostream.hpp" #include int main () { - namespace u = xo::unit::units; - namespace qty = xo::unit::qty; + //namespace u = xo::unit::units; + namespace q = xo::qty::qty; using namespace std; /* 20% volatility over 250 days (approx number of trading days in one year) */ - auto q1 = qty::volatility250d(0.2); + auto q1 = q::volatility_250d(0.2); /* 10% volatility over 30 days */ - auto q2 = qty::volatility30d(0.1); + auto q2 = q::volatility_30d(0.1); auto sum = q1 + q2; auto prod = q1 * q2;