title: C++11 make_pair with specified template parameters doesn't compile
body: <p>I was just playing around with g++ 4.7 (one of the later snapshots) with -std=c++11 enabled. I tried to compile some of my existing code base and one case that failed somewhat confuses me.</p>
  
  <p>I would appreciate if someone can explain what is going on.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>#include &lt;utility&gt;
  #include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;string&gt;
  
  int main ( )
  {
      std::string s = "abc";
  
      // 1 ok
      std::pair &lt; std::string, int &gt; a = std::make_pair ( s, 7 );
  
      // 2 error on the next line
      std::pair &lt; std::string, int &gt; b = std::make_pair &lt; std::string, int &gt; ( s, 7 );
  
      // 3 ok
      std::pair &lt; std::string, int &gt; d = std::pair &lt; std::string, int &gt; ( s, 7 );
  
      return 0;
  }
  </code></pre>
  
  <p>I understand that make_pair is <em>meant</em> to be used as the (1) case (if I specify the types, then I might as well use (3)), but I don't understand why it's failing in this case.</p>
  
  <p>The exact error is:</p>
  
  <pre><code>test.cpp: In function ‘int main()’:
      test.cpp:11:83: error: no matching function for call to ‘make_pair(std::string&amp;, int)’
      test.cpp:11:83: note: candidate is:
      In file included from /gcc4.7/usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/utility:72:0,
                   from test.cpp:1:
      /gcc4.7/usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_pair.h:274:5:
  note: template&lt;class _T1, class _T2&gt; constexpr std::pair&lt;typename std::__decay_and_strip&lt;_T1&gt;::__type, typename std::__decay_and_strip&lt;_T2&gt;::__type&gt; std::make_pair(_T1&amp;&amp;, _T2&amp;&amp;)
      /gcc4.7/usr/local/lib/gcc/i686-pc-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_pair.h:274:5:
  note:   template argument deduction/substitution failed:
      test.cpp:11:83: note:   cannot convert ‘s’ (type ‘std::string {aka std::basic_string&lt;char&gt;}’) to type ‘std::basic_string&lt;char&gt;&amp;&amp;’
  </code></pre>
  
  <p>Again, the question here is just "what's going on?" I know that I can fix the problem by removing the template specification, but I just want to know what's failing here under the covers.</p>
  
  <ul>
  <li>g++ 4.4 compiles this code with no problems.</li>
  <li>Removing -std=c++11 also compiles with code with no problems.</li>
  </ul>