add std::function code example