C++ inherit template class <p>I've got a peculiar request, hopefully it's not too far fetched and can be done.</p> <p>I've got a template class</p> <pre><code> template&lt;class T&gt; class Packable { public: // Packs a &lt;class T&gt; into a Packet (Packet &lt;&lt; T) virtual sf::Packet&amp; operator &lt;&lt;(sf::Packet&amp; p) const = 0; friend sf::Packet&amp; operator &lt;&lt;(sf::Packet&amp; p, const T &amp;t); friend sf::Packet&amp; operator &lt;&lt;(sf::Packet&amp; p, const T *t); // Packs a Packet into a &lt;class T&gt; (T &lt;&lt; Packet) virtual T operator &lt;&lt;(sf::Packet&amp; p) const = 0; friend T&amp; operator &lt;&lt;(T &amp;t, sf::Packet&amp; p); friend T* operator &lt;&lt;(T *t, sf::Packet&amp; p); // Unpacks a Packet into a &lt;class T&gt; (Packet &gt;&gt; T) virtual sf::Packet&amp; operator &gt;&gt;(sf::Packet&amp; p) const = 0; friend sf::Packet&amp; operator &gt;&gt;(sf::Packet&amp; p, T &amp;); friend sf::Packet&amp; operator &gt;&gt;(sf::Packet&amp; p, T* t); }; </code></pre> <p>and I want to be able to use it something like</p> <pre><code>class Player : public Packable { //... } </code></pre> <p>Such that Player now has all of those operators overloaded for it.</p> <p>As of now, I get <code>Expected class name</code> as a compile error. Is there a way to accomplish this without needing to specify the class? That is to say; how can <code>Packable</code> pick up <code>Player</code> as <code>&lt;class T&gt;</code> when I inherit it?</p>