#include <cmath>
#include <functional>
#include <map>
#include <string>
#include <iostream>

typedef double(*mathFunc)(double);

int main() {
    std::map< std::string, mathFunc > funcMap;

    funcMap[std::string( "sqrt")]= std::sqrt;

    double sqrt2 = (funcMap.at("sqrt"))(2.0);

    std::cout << "Result: "<< sqrt2 << std::endl;
    return 0;
}