<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>faith_and_brave</author_name>
  <author_url>https://blog.hatena.ne.jp/faith_and_brave/</author_url>
  <blog_title>Faith and Brave - C++で遊ぼう</blog_title>
  <blog_url>https://faithandbrave.hateblo.jp/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>いつでも使える方法ではないですが、コールバック関数で値を書き換え、書き換わったかどうかを判定する、というのがよく使う方法です。 以下は、Boost.Asioのio_serviceを使用した例。 #include &lt;boost/detail/lightweight_test.hpp&gt; #include &lt;boost/asio.hpp&gt; #include &lt;boost/bind.hpp&gt; namespace asio = boost::asio; void f(int&amp; x) { x = 2; // 2. 書き換える } int main() { int x = 1; // 1. 元々の値 asi…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffaithandbrave.hateblo.jp%2Fentry%2F20111007%2F1317983906&quot; title=&quot; コールバック関数が呼ばれたかのテスト - Faith and Brave - C++で遊ぼう&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>2011-10-07 19:38:26</published>
  <title> コールバック関数が呼ばれたかのテスト</title>
  <type>rich</type>
  <url>https://faithandbrave.hateblo.jp/entry/20111007/1317983906</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
