<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>winebarrel</author_name>
  <author_url>https://blog.hatena.ne.jp/winebarrel/</author_url>
  <blog_title>so what</blog_title>
  <blog_url>https://so-wh.at/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>変数初期化時の代入では、コンストラクタと代入演算子のどちらが呼ばれるのか気になったので、実験してみた。 #include &lt;iostream&gt; using namespace std; #define DEBUG(s) do { cerr &lt;&lt; (s) &lt;&lt; endl; } while(false); class Foo { private: int i; public: Foo(); Foo(int i); Foo &amp;operator=(int i); int value(); }; Foo::Foo() { DEBUG(&quot;Foo::Foo()&quot;); } Foo::Foo(int i) : …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fso-wh.at%2Fentry%2F20080516%2Fp3&quot; title=&quot; 初期化時の代入 - so what&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>2008-05-16 00:00:03</published>
  <title> 初期化時の代入</title>
  <type>rich</type>
  <url>https://so-wh.at/entry/20080516/p3</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
