title: Using a T::Type typedef for defaulting template parameters
body: <p>Is it possible to do something like this:</p>
  
  <pre><code>template &lt;typename T, typename Comparator = std::less&lt;typename T::Key&gt;&gt;
  struct Container
  {
      std::map&lt;typename T::Key, T*, Comparator&gt; m;
  };
  </code></pre>
  
  <p>This is the problem part: <code>typename Comparator = std::less&lt;typename T::Key&gt;</code></p>
  
  <p>i.e. have a typedef within the implementation of the T be used for the specialization of the comparator. Is it always necessary that the thing that the comparator uses (T::Key) be specified as an explicit parameter to the template?</p>
  
  <p>I realize there are other ways around this by changing the T class, (e.g. require an explicit T::compareKey method), but the question is more around whether template syntax can be used to achieve something like this.</p>