50#ifndef TINYEXPR_PLUS_PLUS_H
51#define TINYEXPR_PLUS_PLUS_H
65#include <initializer_list>
76#if __has_include(<bit>)
87#define TINYEXPR_CPP_COPYRIGHT \
88 "TinyExpr: Copyright (c) 2015-2026 Lewis Van Winkle\n" \
89 "TinyExpr++: Copyright (c) 2020-2026 Blake Madden"
93#if defined(TE_RAND_SEED) && defined(TE_RAND_SEED_TIME)
94#error TE_RAND_SEED and TE_RAND_SEED_TIME compile options cannot be combined. Only one random number generator seeding method can be specified.
97#if defined(TE_FLOAT) && defined(TE_LONG_DOUBLE)
98#error TE_FLOAT and TE_LONG_DOUBLE compile options cannot be combined. Only one data type can be specified.
106#elif defined(TE_LONG_DOUBLE)
113#if defined(TE_FLOAT) && defined(TE_BITWISE_OPERATORS)
114#error TE_FLOAT and TE_BITWISE_OPERATORS compile options cannot be combined. TE_FLOAT will not support bitwise operations.
120#define TE_MAX_DEPTH 128
137using te_fun11 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
138using te_fun12 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
139using te_fun13 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
140using te_fun14 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
141using te_fun15 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
142using te_fun16 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
143using te_fun17 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
144using te_fun18 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
145using te_fun19 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
146using te_fun20 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
147using te_fun21 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
148using te_fun22 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
149using te_fun23 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
150using te_fun24 =
te_type (*)(
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
162using te_confun10 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
163using te_confun11 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
164using te_confun12 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
165using te_confun13 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
166using te_confun14 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
167using te_confun15 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
168using te_confun16 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
169using te_confun17 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
170using te_confun18 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
171using te_confun19 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
172using te_confun20 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
173using te_confun21 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
174using te_confun22 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
175using te_confun23 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
176using te_confun24 =
te_type (*)(
const te_expr*,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type,
te_type);
182using te_arg = std::variant<te_type, std::string_view>;
195template <
typename FuncType>
199template <
typename ReturnType,
typename... Args>
202 constexpr static size_t arity = std::tuple_size<arg_tuple>::value;
206template <
typename ReturnType,
typename... Args>
209 constexpr static size_t arity = std::tuple_size<arg_tuple>::value;
213template <
typename FuncType>
222template <
typename FuncType>
228template <
typename ReturnType,
typename... Args>
234template <
typename ReturnType,
typename... Args>
306 bool operator()(
const std::string& lhv,
const std::string& rhv)
const {
307 const auto minStrLen = std::min(lhv.length(), rhv.length());
308 for (
size_t i = 0; i < minStrLen; ++i) {
309 const auto lhCh =
tolower(lhv[i]);
310 const auto rhCh =
tolower(rhv[i]);
314 return (lhCh < rhCh);
316 return (lhv.length() < rhv.length());
322 constexpr static char tolower(
const char chr)
noexcept {
323 return chr + (32 * (chr >=
'A' && chr <=
'Z'));
401 }
catch (
const std::exception& expt) {
425 }
catch (
const std::exception& expt) {
438 constexpr static auto te_nan = std::numeric_limits<te_type>::quiet_NaN();
441 constexpr static int64_t
npos = -1;
450 return std::numeric_limits<te_type>::digits >=
451 std::numeric_limits<uint32_t>::digits;
458 return std::numeric_limits<te_type>::digits >=
459 std::numeric_limits<uint64_t>::digits;
467 return val >
static_cast<te_type>((std::numeric_limits<uint32_t>::max)());
470 return val >=
static_cast<te_type>(uint64_t{1} << 32);
479 return std::numeric_limits<te_type>::digits;
488 std::ldexp(
static_cast<te_type>(1), FLT_MANT_DIG - 1);
489#elif defined(TE_LONG_DOUBLE)
491 std::ldexp(
static_cast<te_type>(1), LDBL_MANT_DIG - 1);
494 std::ldexp(
static_cast<te_type>(1), DBL_MANT_DIG - 1);
496 return maxBit + (maxBit - 1);
580 for (
const auto& var : vars) {
609#ifndef TE_NO_BOOKKEEPING
640 const bool keepResolvedVariables =
true) {
674 if (sep !=
',' && sep !=
'.') {
675 throw std::runtime_error(
676 "Decimal separator must be either a '.' or ','.");
683 if (sep !=
',' && sep !=
'.') {
684 throw std::runtime_error(
685 "Decimal separator must be either a '.' or ','.");
704 nh.value().m_value = value;
724 if (
const auto*
const val = std::get_if<te_type>(&cvar->m_value);
749 if (sep !=
',' && sep !=
';') {
750 throw std::runtime_error(
"List separator must be either a ',' or ';'.");
757 if (sep !=
',' && sep !=
';') {
758 throw std::runtime_error(
"List separator must be either a ',' or ';'.");
762#ifndef TE_NO_BOOKKEEPING
800 return std::isfinite(val) ?
static_cast<bool>(val) :
false;
819#ifndef TE_NO_BOOKKEEPING
857 throw std::runtime_error(
"Variable name is empty.");
860 throw std::runtime_error(
862 "Variable name must begin with a letter from a-z or _: ") +
865 const auto varCharPos = std::find_if(
867 [](
const auto chr)
noexcept { return !is_name_char_valid(chr); });
868 if (varCharPos != var.
m_name.cend()) {
869 throw std::runtime_error(
870 std::string(
"Invalid character in variable name: ") + var.
m_name);
878 return (
is_letter(chr) || (chr >=
'0' && chr <=
'9') || (chr ==
'_') ||
893 const size_t startIndex) {
894 bool inString{
false};
895 for (
size_t i = 0; i < str.length(); ++i) {
897 inString = !inString;
898 }
else if (!inString && str[i] == chr && i >= startIndex) {
902 return std::string::npos;
911 const std::string_view name) {
927 const std::string_view name)
const {
939 return (((type)&
TE_PURE) != 0);
951 [](
const auto& var0) ->
size_t {
952 using T = std::decay_t<
decltype(var0)>;
969 return var.index() == 0;
974 assert(std::holds_alternative<te_type>(var));
975 return std::get<0>(var);
980 return var.index() == 1;
985 assert(std::holds_alternative<const te_type*>(var));
986 return std::get<1>(var);
992 [](
const auto& var0) ->
bool {
993 using T = std::decay_t<
decltype(var0)>;
1001 return std::holds_alternative<std::string_view>(var);
1006 assert(std::holds_alternative<std::string_view>(var));
1007 return std::get<std::string_view>(var);
1012 return std::holds_alternative<te_arg_fun>(var);
1017 return std::holds_alternative<te_arg_confun>(var);
1020#define TE_DEF_FUNCTION(n) \
1022 constexpr static bool is_function##n(const te_variant_type& var) noexcept { \
1023 return std::holds_alternative<te_fun##n>(var); \
1026 constexpr static te_fun##n get_function##n(const te_variant_type& var) { \
1027 assert(std::holds_alternative<te_fun##n>(var)); \
1028 return std::get<te_fun##n>(var); \
1033#undef TE_DEF_FUNCTION
1038 [](
const auto& var0) ->
bool {
1039 using T = std::decay_t<
decltype(var0)>;
1045#define TE_DEF_CLOSURE(n) \
1047 constexpr static bool is_closure##n(const te_variant_type& var) noexcept { \
1048 return std::holds_alternative<te_confun##n>(var); \
1051 constexpr static te_confun##n get_closure##n(const te_variant_type& var) { \
1052 assert(std::holds_alternative<te_confun##n>(var)); \
1053 return std::get<te_confun##n>(var); \
1058#undef TE_DEF_CLOSURE
1078 assert(texp !=
nullptr);
1102 std::set<te_variable>& vars)
1125 const std::initializer_list<te_expr*>& parameters) {
1126 auto* ret =
new te_expr{type, value};
1128 std::max<size_t>(parameters.size(),
get_arity(ret->m_value)) +
1131 if (parameters.size() != 0U) {
1132 std::ranges::copy(parameters, ret->m_parameters.begin());
1140 auto* ret =
new te_expr{type, value};
1148 return (chr >=
'a' && chr <=
'z') || (chr >=
'A' && chr <=
'Z');
1158 std::set<te_variable>& variables);
1166 if (texp ==
nullptr) {
1249#ifndef TE_NO_BOOKKEEPING
std::vector< te_expr * > m_parameters
Additional parameters.
te_expr(const te_variable_flags type) noexcept
te_variable_flags m_type
The type that m_value represents.
te_expr(const te_variable_flags type, const te_variant_type &value) noexcept
te_expr() noexcept=default
te_variant_type m_value
The te_type constant, te_type pointer, or function to bind to.
te_type get_constant(const std::string_view name) const
Retrieves a constant variable's value.
const std::set< te_variable > & get_variables_and_functions() const noexcept
te_expr * m_compiledExpression
te_expr * expr_level1(state *theState)
te_expr * power(state *theState)
static void optimize(te_expr *texp)
te_expr * expr_level8(state *theState)
static const std::set< te_variable > m_functions
static constexpr bool is_variable(const te_variant_type &var) noexcept
static constexpr bool is_letter(const char chr) noexcept
te_parser(const te_parser &that)
static te_type get_max_integer()
std::set< te_variable > m_customFuncsAndVars
static constexpr te_type get_constant_value(const te_variant_type &var)
std::set< te_variable::name_type > m_resolvedVariables
char get_decimal_separator() const volatile noexcept
static size_t get_parameter_count(const te_expr *texp)
static constexpr std::string_view get_string(const te_variant_type &var)
void set_unknown_symbol_resolver(te_usr_variant_type usr, const bool keepResolvedVariables=true)
Sets a custom function to resolve unknown symbols in an expression.
std::set< te_variable::name_type, te_string_less > m_usedVars
std::set< te_variable::name_type, te_string_less > m_usedFunctions
std::set< te_variable > & get_variables_and_functions() noexcept
void set_list_separator(const char sep)
Sets the separator used between function arguments.
static auto find_lookup(state *ste, const std::string_view name)
static constexpr bool is_name_char_valid(const char chr) noexcept
te_type evaluate(std::string_view expression)
Compiles and evaluates an expression and returns its result.
static constexpr bool is_string(const te_variant_type &var) noexcept
const te_expr * get_compiled_expression() const volatile noexcept
bool success() const noexcept
std::set< te_variable >::iterator find_variable_or_function(const std::string_view name)
te_usr_variant_type m_unknownSymbolResolve
static constexpr bool is_function(const te_variant_type &var)
te_expr * expr_level2(state *theState)
static constexpr bool is_arg_function(const te_variant_type &var) noexcept
static size_t find_outside_of_string(const std::string &str, const char chr, const size_t startIndex)
void reset_usr_resolved_if_necessary()
Resets any resolved variables from USR if not being cached.
bool is_variable_used(const std::string_view name) const
const te_expr * get_compiled_expression() const noexcept
Gets the compiled expression, which will be the optimized version of the original expression.
bool success() const volatile noexcept
te_expr * te_compile(std::string_view expression, std::set< te_variable > &variables)
Parses the input expression and binds variables.
std::string list_available_functions_and_variables()
te_type evaluate()
Evaluates expression passed to compile() previously and returns its result.
void reset_state()
Reset everything from previous call.
std::set< te_variable >::const_iterator find_variable_or_function(const std::string_view name) const
std::string m_lastErrorMessage
void add_variable_or_function(te_variable var)
Adds a custom variable or function.
void remove_unused_variables_and_functions()
Removes any custom variables and functions that weren't used in the last compilation.
void set_variables_and_functions(std::set< te_variable > vars)
Sets the list of custom variables and functions.
static constexpr bool supports_32bit() noexcept
te_expr * expr_level3(state *theState)
static constexpr bool is_closure(const te_variant_type &var)
te_expr * factor(state *theState)
static constexpr bool is_any_closure(const te_variant_type &var)
te_expr * expr_level7(state *theState)
static constexpr double MAX_BITOPS_VAL
te_expr * expr_level6(state *theState)
static constexpr bool is_any_function(const te_variant_type &var)
static void te_free_parameters(te_expr *texp)
static te_type te_eval(const te_expr *texp)
static auto get_arity(const te_variant_type &var)
static bool number_to_bool(te_type val)
Helper function to convert a number into boolean.
bool m_keepResolvedVariables
static te_expr * new_expr(const te_variable_flags type, te_variant_type value)
int64_t get_last_error_position() const volatile noexcept
static constexpr auto is_variadic(const te_variable_flags type)
char get_list_separator() const volatile noexcept
static std::string info()
static constexpr bool te_exceeds_uint32(te_type val) noexcept
static auto find_builtin(const std::string_view name)
static te_expr * new_expr(const te_variable_flags type, te_variant_type value, const std::initializer_list< te_expr * > ¶meters)
const std::string & get_last_error_message() const noexcept
void next_token(state *theState)
te_expr * base(state *theState)
static constexpr const te_type * get_variable(const te_variant_type &var)
te_parser & operator=(const te_parser &that)
static constexpr bool supports_64bit() noexcept
bool compile(std::string_view expression)
Parses the input expression.
static constexpr bool is_arg_closure(const te_variant_type &var) noexcept
static constexpr int get_max_integer_bitness() noexcept
static void validate_name(const te_variable &var)
Validates that a variable only contains legal characters (and has a valid length).
te_expr * expr_level5(state *theState)
bool is_function_used(const std::string_view name) const
void set_list_separator(const char sep) volatile
void set_decimal_separator(const char sep)
Sets the decimal separator used for numbers.
te_expr * list(state *theState)
te_type get_result() const volatile noexcept
te_expr * base_impl(state *theState)
static constexpr auto te_nan
NaN (not-a-number) constant to indicate an invalid value.
void set_decimal_separator(const char sep) volatile
static constexpr auto is_pure(const te_variable_flags type)
te_expr * term(state *theState)
static constexpr bool is_constant(const te_variant_type &var) noexcept
char get_decimal_separator() const noexcept
void remove_variable_or_function(te_variable::name_type var)
Removes a custom variable or function.
te_expr * expr_level9(state *theState)
int64_t get_last_error_position() const noexcept
std::set< te_variable >::const_iterator m_currentVar
char get_list_separator() const noexcept
static constexpr int64_t npos
No position, which is what get_last_error_position() returns when there was no parsing error.
te_expr * expr_level4(state *theState)
te_type get_result() const noexcept
void set_constant(const std::string_view name, const te_type value)
Sets a constant variable's value.
const std::string & get_expression() const noexcept
static void te_free(te_expr *texp)
bool operator()(const std::string &lhv, const std::string &rhv) const
static constexpr char tolower(const char chr) noexcept
Custom variable or function that can be added to a te_parser.
bool operator<(const te_variable &that) const
te_variable_flags m_type
The type that m_value represents.
name_type m_name
The name as it would appear in a formula.
te_variant_type m_value
The te_type constant, te_type pointer, or function to bind the name to.
std::tuple< Args... > arg_tuple
static constexpr size_t arity
static constexpr size_t arity
std::tuple< Args... > arg_tuple
static constexpr bool value
static constexpr bool value
static constexpr bool value
static constexpr bool value
te_variable_flags m_varType
std::set< te_variable > & m_lookup
state(const char *expression, te_variable_flags varType, std::set< te_variable > &vars)
te_type(*)(const te_expr *, te_type) te_confun1
te_type(*)(const te_expr *, te_type, te_type, te_type) te_confun3
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun10
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun9
std::variant< te_type, std::string_view > te_arg
A function argument, either a number or a string literal.
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun20
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun23
float te_type
Define this to use float instead of double for the parser's data type.
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun21
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun18
std::variant< te_usr_noop, te_usr_fun0, te_usr_fun1 > te_usr_variant_type
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun12
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type) te_confun5
te_type(*)(const te_expr *, std::span< const te_arg >) te_arg_confun
Context version of te_arg_fun (te_variable passes a client's te_expr first).
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type) te_confun4
constexpr int TINYEXPR_CPP_TWEAK_VERSION
te_type(*)(std::span< const te_arg >) te_arg_fun
A function taking any number of number-or-string arguments.
constexpr int TINYEXPR_CPP_MINOR_VERSION
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun7
constexpr bool te_is_function_v
constexpr bool te_is_arg_function_v
te_variable_flags
A variable's flags, effecting how it is evaluated.
@ TE_VARIADIC
Function that can take 1-24 argument (unused arguments are set to NaN).
@ TE_PURE
Don't update when simple evaluation is run (i.e., only updated when expression is compiled).
@ TE_DEFAULT
Don't do anything special when evaluating.
constexpr bool te_is_string_v
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun20
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun14
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun24
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun22
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type) te_fun6
constexpr bool te_is_closure_v
std::variant< te_type, const te_type *, te_fun0, te_fun1, te_fun2, te_fun3, te_fun4, te_fun5, te_fun6, te_fun7, te_fun8, te_fun9, te_fun10, te_fun11, te_fun12, te_fun13, te_fun14, te_fun15, te_fun16, te_fun17, te_fun18, te_fun19, te_fun20, te_fun21, te_fun22, te_fun23, te_fun24, te_confun0, te_confun1, te_confun2, te_confun3, te_confun4, te_confun5, te_confun6, te_confun7, te_confun8, te_confun9, te_confun10, te_confun11, te_confun12, te_confun13, te_confun14, te_confun15, te_confun16, te_confun17, te_confun18, te_confun19, te_confun20, te_confun21, te_confun22, te_confun23, te_confun24, te_arg_fun, te_arg_confun, std::string_view > te_variant_type
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun19
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type) te_confun6
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun11
constexpr bool te_is_arg_closure_v
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun18
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun19
std::function< te_type(std::string_view, std::string &)> te_usr_fun1
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun17
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun8
te_type(*)(te_type, te_type, te_type) te_fun3
constexpr int TINYEXPR_CPP_PATCH_VERSION
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun7
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun9
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun14
constexpr bool te_is_variable_v
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun11
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun24
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun16
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun15
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun21
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun10
std::function< te_type(std::string_view)> te_usr_fun0
te_type(*)(const te_expr *, te_type, te_type) te_confun2
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun13
constexpr bool te_is_constant_v
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun8
te_type(*)(te_type, te_type) te_fun2
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun13
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun15
std::function< void()> te_usr_noop
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun16
constexpr size_t te_function_arity
constexpr int TINYEXPR_CPP_MAJOR_VERSION
te_type(*)(te_type, te_type, te_type, te_type, te_type) te_fun5
te_type(*)(te_type) te_fun1
te_type(*)(const te_expr *) te_confun0
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun17
te_type(*)(te_type, te_type, te_type, te_type) te_fun4
te_type(*)(te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_fun12
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun23
te_type(*)(const te_expr *, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type, te_type) te_confun22