<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kou6839</author_name>
  <author_url>https://blog.hatena.ne.jp/kou6839/</author_url>
  <blog_title>kou6839の日記</blog_title>
  <blog_url>https://kou6839.hatenadiary.jp/</blog_url>
  <categories>
  </categories>
  <description>知らなかったんですが、 以下のように、クラスＢ型のコンストラクタにクラスＡ型を受け取るものを作っておくと、クラスB型を返す関数funcの戻り値をクラスA型にすることができます。 どういう目的でそうなったのかはわからないですが・・・。 class A { public: int a; A(int a) :a(a) {} }; class B { public: int b; B(int b) : b(b) {} B(A AA) { b = AA.a;} }; B Func() { A tmp(100); return tmp; } int main() { B b = Func(); cout …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkou6839.hatenadiary.jp%2Fentry%2F2019%2F10%2F22%2F162833&quot; title=&quot;c++で違う型を返す - kou6839の日記&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>2019-10-22 16:28:33</published>
  <title>c++で違う型を返す</title>
  <type>rich</type>
  <url>https://kou6839.hatenadiary.jp/entry/2019/10/22/162833</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
