title: C++ Concepts: Checking if derived from a templated class with unknown template parameter
body: <p>Is there a way to use C++ concepts to require that a class is derived from a templated class, whose template parameter is again a derived class from another templated class.</p>
  <p>Example:</p>
  <pre class="lang-c prettyprint-override"><code>template &lt;class T&gt;
  class A{};
  
  template &lt;class T&gt;
  class B{};
  
  class X{};
  class Y : public A&lt;X&gt; {};
  
  class Z : public B&lt;Y&gt; {};
  </code></pre>
  <p>How can I check in <code>B</code>, that <code>T</code> is of the form <code>std::is_base_of&lt;A&lt;X&gt;,T&gt;</code> for some <code>X</code> without specifying what <code>X</code> is?
  I don't want to add <code>X</code> to the template paramter list of <code>B</code>, because I don't want to change code at every instance where <code>B</code> is derived from (e.g. the last line with <code>class Z</code>).</p>