<?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>
  </categories>
  <description>C++11標準ライブラリで新しく追加されたstd::promiseとstd::futureについてメモ。 future/promiseの基本 両者ともに標準ヘッダ &lt;future&gt; にて定義されるクラステンプレートであり、「別スレッドでの処理完了を待ち、その処理結果を取得する」といった非同期処理を実現するための部品*1。 処理結果として、通常の戻り値(value)または例外(exception)を扱う*2。戻り値の型はテンプレート引数にて指定するが、例外は任意の型を扱うことができる。（例: int型を扱うならstd::future&lt;int&gt;, std::promise&lt;int&gt;を用いる。例外は…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20120131%2Fp1&quot; title=&quot;futureとpromiseのあれこれ（理論編） - 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>2012-01-31 00:00:00</published>
  <title>futureとpromiseのあれこれ（理論編）</title>
  <type>rich</type>
  <url>https://yohhoy.hatenadiary.jp/entry/20120131/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
