title: decltype(some_vector)::size_type doesn't work as template parameter
body: <p>The following class does not compile:</p>
  
  <pre><code>template&lt;class Key, class Compare = std::less&lt;Key&gt;, class Allocator = std::allocator&lt;Key&gt;&gt;
  class MyContainer
  {   
  public:
      std::vector&lt;Key, Allocator&gt; data;
      std::vector&lt;std::pair&lt;std::size_t, decltype(data)::size_type&gt;&gt; order;
  };
  </code></pre>
  
  <p>I get the following compiler error:</p>
  
  <blockquote>
    <p>error: type/value mismatch at argument 2 in template parameter list for ‘template struct std::pair’</p>
  </blockquote>
  
  <p><br/>
  Why does that fail to compile, while the following code works fine?</p>
  
  <pre><code>template&lt;class Key, class Compare = std::less&lt;Key&gt;, class Allocator = std::allocator&lt;Key&gt;&gt;
  class MyContainer
  {   
  public:
      std::vector&lt;Key, Allocator&gt; data;
      std::vector&lt;std::pair&lt;std::size_t, std::size_t&gt;&gt; order;
  };
  </code></pre>