Код: Выделить всё
std::function str2lambda(const std::string& str) {
// Conversion
// return lambda function
}
Ввод математической функции:
"x^2+1"
Выходная лямбда-функция:
Код: Выделить всё
auto func = [](float x) -> float { return pow(x, 2) + 1; }; Подробнее здесь: https://stackoverflow.com/questions/782 ... ction-in-c
Мобильная версия