{"categories":["C++"],"type":"rich","author_url":"https://blog.hatena.ne.jp/faith_and_brave/","author_name":"faith_and_brave","height":"190","width":"100%","provider_url":"https://hatena.blog","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffaithandbrave.hateblo.jp%2Fentry%2F20131127%2F1385535726\" title=\" function\u3092\u7a7a\u306b\u3059\u308b\u65b9\u6cd5 - Faith and Brave - C++\u3067\u904a\u307c\u3046\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"Faith and Brave - C++\u3067\u904a\u307c\u3046","url":"https://faithandbrave.hateblo.jp/entry/20131127/1385535726","blog_url":"https://faithandbrave.hateblo.jp/","title":" function\u3092\u7a7a\u306b\u3059\u308b\u65b9\u6cd5","version":"1.0","published":"2013-11-27 16:02:06","provider_name":"Hatena Blog","description":"boost::function\u306f\u3001clear()\u30e1\u30f3\u30d0\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3002 #include <iostream> #include <boost/function.hpp> void foo() {} int main() { boost::function<void()> f = foo; f.clear(); // \u3053\u308c if (f) { std::cout << \"has function\" << std::endl; } else { std::cout << \"hasn't function\" << std::endl; } } hasn't functionstd::function\u2026"}