Force template parameter class to inherit from another templated class with partially fulfilled parameters
<p>So I have the following two classes:</p>

<pre><code>template &lt; class Cost &gt;
class Transformation {
  public:
    virtual Cost getCost() = 0;
};

template &lt; class TransfCl, class Cost &gt;
class State {
    protected:
        State(){
            static_assert(
                std::is_base_of&lt; Transformation&lt; Cost &gt;, TransfCl &gt;::value,
                "TransfCl class in State must be derived from Transformation&lt; Cost &gt;"
            );
        }
    public:
        virtual void apply( const TransfCl&amp; ) = 0;
};
</code></pre>

<p>But would like to, instead, be able to drop the <code>Cost</code> template parameter to <code>State</code>, because <code>State</code>'s functionality is completely independent of <code>Cost</code>.  This way, I could create non-abstract classes using a syntax similar to this:</p>

<pre><code>class TransfImpl : public Transformation&lt; int &gt;{
    public: int getCost(){ return 0; }
};

class StateImpl : public State&lt; TransfImpl &gt;{
    public:
        StateImpl(){
            static_assert(
                std::is_base_of&lt; Transformation, TransfImpl  &gt;::value,
                "TransfImpl must inherit from Transformation&lt; Cost &gt;"
            );
        }
        void apply( const TransfImpl &amp; ){}
};
</code></pre>

<p>I also wanted to eventually chain this to a third class, which would use the <code>State</code>-derived class as its template parameter, but wouldn't need to also have the <code>Transformation</code>-derived and <code>Cost</code>-derived classes in its template parameters to verify that its <code>State</code>-derived template parameter class is, in fact, derived from <code>State</code></p>