<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yohhoy</author_name>
  <author_url>https://blog.hatena.ne.jp/yohhoy/</author_url>
  <blog_title>yohhoyの日記</blog_title>
  <blog_url>https://yohhoy.hatenadiary.jp/</blog_url>
  <categories>
    <anon>C++</anon>
    <anon>C++1z</anon>
  </categories>
  <description>C++1z(C++17)で修正される、std::functionクラステンプレートが扱う関数戻り値型にまつわる小さな問題。 // ラムダはintを返すがfunctionオブジェクトは戻り値型voidを扱う std::function&lt;void()&gt; f = [](){ return 42; }; // C++11/14: 未定義動作(undefined behavior) // C++1z: well-defiend この問題は LWG 2420 にて取り扱われ、2015年5月現在のWorking Draft*1で修正適用された。 下記サンプルコードにおいて、オブジェクトf1のコンストラクタ呼…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20150927%2Fp1&quot; title=&quot;std::functionの戻り値型に関する小修正 - yohhoyの日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-09-27 00:00:00</published>
  <title>std::functionの戻り値型に関する小修正</title>
  <type>rich</type>
  <url>https://yohhoy.hatenadiary.jp/entry/20150927/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
