<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>wata_d</author_name>
  <author_url>https://blog.hatena.ne.jp/wata_d/</author_url>
  <blog_title>閑古鳥</blog_title>
  <blog_url>https://www.little-cuckoo.jp/</blog_url>
  <categories>
    <anon>programming</anon>
    <anon>C++</anon>
  </categories>
  <description>前回(id:wata_d:20050723:1122066377)軽く紹介した、「派生クラスの型を基底クラスに渡す」というイディオムについてちょっとだけ書いてみます。 template&lt;class T&gt; struct Base { void Execute() { static_cast&lt;T*&gt;(this)-&gt;Print(); } void Print() { std::cout &lt;&lt; &quot;Base&quot; &lt;&lt; std::endl; } }; struct Derived : public Base&lt;Derived&gt; { void Print() { std::cout &lt;&lt; &quot;Derived&quot; &lt;…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.little-cuckoo.jp%2Fentry%2F20050725%2F1122239908&quot; title=&quot;派生クラスの型を既定クラスに渡す - 閑古鳥&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>2005-07-25 06:18:28</published>
  <title>派生クラスの型を既定クラスに渡す</title>
  <type>rich</type>
  <url>https://www.little-cuckoo.jp/entry/20050725/1122239908</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
