<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>pto8913</author_name>
  <author_url>https://blog.hatena.ne.jp/pto8913/</author_url>
  <blog_title>pto8913のメモ帳</blog_title>
  <blog_url>https://pto8913.hatenablog.com/</blog_url>
  <categories>
    <anon>UE4-C++</anon>
  </categories>
  <description>やあ C++なにもわからない僕が、親クラスと子クラスのヘッダーファイルを分け、親クラスでテンプレート関数を実装して、子クラスで呼び出そうとしたらリンカエラーが出たので、解決策をメモ。 やあ 状況例 解決策1 解決策2 参考 状況例 Parent.h class Parent { public: template&lt;typename T&gt; T Sum(T a, T b); }; Parent.cpp #include &quot;Parent.h&quot; template&lt;typename T&gt; T Parent::Sum(T a, T b) { return a + b; } Child.h #include …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpto8913.hatenablog.com%2Fentry%2F2020%2F12%2F03%2F125508&quot; title=&quot;C++ 別ヘッダーファイルで宣言したテンプレート関数を呼ぶとリンカエラーになる - pto8913のメモ帳&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-12-03 12:55:08</published>
  <title>C++ 別ヘッダーファイルで宣言したテンプレート関数を呼ぶとリンカエラーになる</title>
  <type>rich</type>
  <url>https://pto8913.hatenablog.com/entry/2020/12/03/125508</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
