title: Inherit constructors from template base class without repeating template arguments?
body: <p>How do I inherit constructors from a template base class without repeating the template arguments (and without using macros):</p>
  
  <p>For example, this does not work (using GCC 4.8):</p>
  
  <pre><code>template &lt;typename T&gt;
  struct base {};
  
  template &lt;typename U&gt;
  struct derived : base&lt;U&gt; {
      using base::base;
  };
  </code></pre>
  
  <p>It does work if I repeat the template arguments of the base class:</p>
  
  <pre><code>template &lt;typename T&gt;
  struct base {};
  
  template &lt;typename U&gt;
  struct derived : base&lt;U&gt; {
      using base&lt;U&gt;::base;
  };
  </code></pre>
  
  <p>The problem is that "U" might be something very complex and that is annoying and error prone to repeat. For example, here is one of my original motivating examples:</p>
  
  <pre><code>#include &lt;boost/multi_index_container.hpp&gt;
  #include &lt;boost/multi_index/key_extractors.hpp&gt;
  #include &lt;boost/multi_index/ordered_index.hpp&gt;
  #include &lt;boost/multi_index/sequenced_index.hpp&gt;
  
  using namespace boost::multi_index;
  
  struct as_list_tag {};
  struct as_set_tag  {};
  
  template &lt;typename T&gt;
  struct unique_list : multi_index_container &lt;
      T,
      indexed_by &lt;
          sequenced&lt;tag&lt;as_list_tag&gt;&gt;,
          ordered_unique&lt;tag&lt;as_set_tag&gt;, identity&lt;T&gt;&gt;
      &gt;
  &gt; {
      using multi_index_container &lt;
          T,
          indexed_by &lt;
              sequenced&lt;tag&lt;as_list_tag&gt;&gt;,
              ordered_unique&lt;tag&lt;as_set_tag&gt;, identity&lt;T&gt;&gt;
          &gt;
      &gt;
      ::multi_index_container;
      using as_list = as_list_tag;
      using as_set  = as_set_tag ;
  };
  </code></pre>
  
  <p>I ended up working around this by using a macro:</p>
  
  <pre><code>#define MAKE_UNIQUE_LIST(template_params...)\
  template &lt;typename T&gt;\
  struct unique_list : multi_index_container template_params\
  {\
      using multi_index_container template_params ::multi_index_container;\
      using as_list = as_list_tag;\
      using as_set  = as_set_tag ;\
  };
  
  MAKE_UNIQUE_LIST(&lt;
      T,
      indexed_by &lt;
          sequenced&lt;tag&lt;as_list_tag&gt;&gt;,
          ordered_unique&lt;tag&lt;as_set_tag&gt;, identity&lt;T&gt;&gt;
      &gt;
  &gt;)
  #undef MAKE_UNIQUE_LIST
  </code></pre>
  
  <p>Is there a better way to approach this? Some syntax trick I am missing? =)</p>