title: Make all types passed as template-template argument a friend
body: <p>In the following code, I would like whatever type I pass through to <code>MyStruct</code> to be declared as a friend of that structure.  I anticipate having many different types being passed through and I don't want to have to manually add each one as a friend, like I have shown for the two current possible classes.  I cannot figure out the syntax for this, can someone tell me please?</p>
  <pre><code>template&lt;typename MyStructType&gt;
  struct OTHER_SUB_TYPE {
    OTHER_SUB_TYPE(MyStructType* p) {  p-&gt;private_function(); }
    // Need to access other private members of MyStructType
  };
  
  template&lt;typename MyStructType&gt;
  struct DEFAULT_SUB_TYPE {
    DEFAULT_SUB_TYPE(MyStructType* p) { p-&gt;private_function(); }
    // Need to access other private members of MyStructType
  };
  
  template&lt;template&lt;typename&gt; class SUB_TYPE = DEFAULT_SUB_TYPE&gt;
  struct MyStruct {
    SUB_TYPE&lt;MyStruct&gt; Get() { return SUB_TYPE{this}; }
  
    // Would like to avoid having to declare each type individually!
    template&lt;typename T&gt; friend struct DEFAULT_SUB_TYPE;
    template&lt;typename T&gt; friend struct OTHER_SUB_TYPE;
  
  private:
    void private_function() {}
  };
  
  
  int main() {
  
    MyStruct&lt;&gt; def;
    def.Get();
  
    MyStruct&lt;OTHER_SUB_TYPE&gt; other;
    other.Get();
  }
  </code></pre>