<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Perfect forwarding hides proper overload"
   href="http://llvm.org/bugs/show_bug.cgi?id=20175">bug 20175</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>richard-llvm@metafoo.co.uk
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Perfect forwarding hides proper overload"
   href="http://llvm.org/bugs/show_bug.cgi?id=20175#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Perfect forwarding hides proper overload"
   href="http://llvm.org/bugs/show_bug.cgi?id=20175">bug 20175</a>
              from <span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span></b>
        <pre>The candidates for this call:

  d.out(s, l);

are:

1) int derived::out(int s, const char &w)
2) auto decorator<Aut>::out(Args&&... args) -> decltype(a_.out(args...))
     [Aut = base<std::pair<char, char>>,
      Args = {int&, char&}]

Both overload candidates are viable. The second is preferred, because it is a
better match for the second parameter (a char lvalue prefers a 'char&'
parameter over a 'const char&' parameter) and is no worse on the first
parameter (an int lvalue is equally happy with an 'int' parameter or an 'int&'
parameter).

So #2 is called.

If you think something else should have happened here, please reopen this bug
and explain what you think should have happened and why.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>