title: Breaking change in C++11 with make_pair(_Ty1&& _Val1, const _Ty2& _Val2)
body: <p>Consider the following C++ Program</p>
  
  <pre><code>#include&lt;map&gt;
  #include&lt;iostream&gt;
  int main() {
      int a = 5, b = 7;
      auto pair = std::make_pair&lt;int, int&gt;(a,b);
      return 0;
      }
  </code></pre>
  
  <p>Using VC11 and also in <a href="http://ideone.com/g3Wcne" rel="noreferrer">gcc-4.7.2 fails</a> with different errors, though it seems to be related and VC11 error message is more meaningful</p>
  
  <pre><code>You cannot bind an lvalue to an rvalue   
  </code></pre>
  
  <p>What I understand from this failure is</p>
  
  <ol>
  <li>VC11 and I suppose gcc-4.7.2 have only one implementation of std::make_pair <code>make_pair(_Ty1&amp;&amp; _Val1, const _Ty2&amp; _Val2)</code> which can accept only an rvalue reference. Prior VC++ version example VC10 had two versions, one to accept an lvalue and another an rvalue reference</li>
  <li>Rvalue reference cannot be used to initialize a non const reference i.e. <code>int &amp; a = b * 5</code> is invalid.</li>
  <li>I could have used <code>std::move</code> to convert the <code>lvalue</code> to <code>rvalue</code> reference and the call would be successful.</li>
  <li>As <code>std::make_pair</code> accepts two different types for each of the parameters, Template Argument Resolution in all possible cases can resolve the type of the parameter and an explicitly specifying the type is not required.</li>
  </ol>
  
  <p>This scenario seems trivial and the incompatibility can easily be resolved by removing the explicit type specification and making the definition as</p>
  
  <pre><code>auto pair = std::make_pair(a,b);
  </code></pre>
  
  <ul>
  <li>Now, my question is, what is the driving factor to remove the lvalue implementation from the library? </li>
  <li>Is it possible to know any other library functions which has been changed in similar ways?</li>
  <li>How to handle these situations when I need to target multiple compilers like g++, CC, aCC, XL C++ where either the compilers have not been upgraded or the compiler isn't supporting the rvalue reference and or move semantics.</li>
  </ul>