<?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>gcc</anon>
    <anon>Clang</anon>
    <anon>MSVC</anon>
  </categories>
  <description>C++においてコンストラクタ／デストラクタからの仮想関数呼び出しそれ自体はwell-definedだが、おそらくC++プログラマの期待する振る舞いではない。バグの温床になりえるため、大抵のコーディング規約で禁止している（はず）。かつてClangに本件を検知する警告オプションが提案*1されたが放棄された模様。 struct Base { Base() { // コンストラクタ中での仮想関数呼び出しは // B::vfを呼び出す（D::vfではない！） vf(); } void g() { // 通常(非static)メンバ関数中からであれば // オーバーライドされたD::vfを呼び出す vf(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20200504%2Fp1&quot; title=&quot;コンストラクタ／デストラクタ×仮想関数呼び出し - 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>2020-05-04 00:00:00</published>
  <title>コンストラクタ／デストラクタ×仮想関数呼び出し</title>
  <type>rich</type>
  <url>https://yohhoy.hatenadiary.jp/entry/20200504/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
