diff --git a/exprtk_simple_example_05.cpp b/exprtk_simple_example_05.cpp index 1002300..939b765 100644 --- a/exprtk_simple_example_05.cpp +++ b/exprtk_simple_example_05.cpp @@ -28,7 +28,7 @@ struct myfunc : public exprtk::ifunction myfunc() : exprtk::ifunction(2) - {} + { exprtk::disable_has_side_effects(*this); } inline T operator()(const T& v1, const T& v2) { diff --git a/exprtk_simple_example_12.cpp b/exprtk_simple_example_12.cpp index 1aed5af..61af16b 100644 --- a/exprtk_simple_example_12.cpp +++ b/exprtk_simple_example_12.cpp @@ -47,7 +47,7 @@ void bubble_sort() " upper_bound -= 1; " " until (not(swapped) or (upper_bound == 0)); "; - T v[] = { T(2.2), T(1.1), T(5.5), T(4.4), T(3.3) }; + T v[] = { T(9.9), T(2.2), T(1.1), T(5.5), T(7.7), T(4.4), T(3.3) }; symbol_table_t symbol_table; symbol_table.add_vector("v",v); diff --git a/exprtk_simple_example_15.cpp b/exprtk_simple_example_15.cpp index 4808d17..bae566b 100644 --- a/exprtk_simple_example_15.cpp +++ b/exprtk_simple_example_15.cpp @@ -61,7 +61,6 @@ void black_scholes_merton_model() expression.register_symbol_table(symbol_table); parser_t parser; - parser.compile(bsm_model_program,expression); {