{"categories":["C++"],"blog_url":"https://secret-garden.hatenablog.com/","description":"C++11 \u3067\u306f __func__ \u3068\u3044\u3046\u8b58\u5225\u5b50\u304c\u8ffd\u52a0\u3055\u308c\u3001\u95a2\u6570\u540d\u304c\u6587\u5b57\u5217\u3067\u53d6\u5f97\u3059\u308b\u4e8b\u304c\u51fa\u6765\u307e\u3059\u3002 #include <iostream> namespace my{ template<typename T, typename U> auto plus(T a, U b){ // \u73fe\u5728\u306e\u95a2\u6570\u306e\u540d\u524d\u3092\u53d6\u5f97\u3067\u304d\u308b std::cout << __func__ << std::endl; return a + b; } } int main(){ std::cout << my::plus(1, 2) << std::endl; return 0; } /* output: plus 3 */ GCC\u2026","title":"GCC \u306e __PRETTY_FUNCTION__ \u8b58\u5225\u5b50","provider_name":"Hatena Blog","height":"190","provider_url":"https://hatena.blog","type":"rich","width":"100%","author_name":"osyo-manga","author_url":"https://blog.hatena.ne.jp/osyo-manga/","url":"https://secret-garden.hatenablog.com/entry/2017/10/23/234527","version":"1.0","image_url":null,"blog_title":"Secret Garden(Instrumental)","published":"2017-10-23 23:45:27","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsecret-garden.hatenablog.com%2Fentry%2F2017%2F10%2F23%2F234527\" title=\"GCC \u306e __PRETTY_FUNCTION__ \u8b58\u5225\u5b50 - Secret Garden(Instrumental)\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}