Template Function wt::parse_expression

Function Documentation

template<NumericOrBool R>
inline R wt::parse_expression(const std::string &expr)

Parse a math expression defined as the string expr and returns the evaluated result. Also prints the parsed result to cout with info verbosity.

Parse a complex-valued math expression defined as the string expr and returns the evaluated result. Also prints the parsed result to cout with info verbosity.

Template Parameters:

type – of result, must be either a Numeric or a bool

Returns:

R the evaluated result