<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>E_Mattsan</author_name>
  <author_url>https://blog.hatena.ne.jp/E_Mattsan/</author_url>
  <blog_title>エンジニアのソフトウェア的愛情</blog_title>
  <blog_url>https://blog.emattsan.org/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>いま、C++ プログラミングの筋と定石を読んでいる途中なんですが、未経験の実装が出てきて戸惑っているところ。 基底クラスのコンストラクタの中で、placement newを使って自分の領域(this)を自分の派生クラスでconstructしてしまうというもの。これで、一種の仮想コンストラクタを実現してます。new(this) Derivedというコードの賛否については保留したとして、それ以外で問題になるのがオブジェクトのサイズです。この仕組を実現しているのは基底クラスのコンストラクタの中なので、thisが指し示す領域のサイズが派生クラスのオブジェクトが収まるサイズなのかわかりません。というか、…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.emattsan.org%2Fentry%2F20100208%2F1265640034&quot; title=&quot;virtual constructor...? - エンジニアのソフトウェア的愛情&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>https://images-fe.ssl-images-amazon.com/images/I/51G%2BdnezRWL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-02-08 23:40:34</published>
  <title>virtual constructor...?</title>
  <type>rich</type>
  <url>https://blog.emattsan.org/entry/20100208/1265640034</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
