2011-05-27から1日間の記事一覧
#include <iostream> #include <functional> #include <string> int main() { auto f = [](std::string &&str) -> std::function<void()> { std::string s_ = str; return [s_] () mutable -> void { std::cout << s_ << std::endl; s_ += std::string(" Hello"); }; }; auto g = f("Message : "); </void()></string></functional></iostream>…