<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:eric@efcs.ca" title="Eric Fiselier <eric@efcs.ca>"> <span class="fn">Eric Fiselier</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [Regression] std::function no longer accepts an incomplete return type."
   href="https://bugs.llvm.org/show_bug.cgi?id=34298">bug 34298</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>ASSIGNED
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>eric@efcs.ca
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [Regression] std::function no longer accepts an incomplete return type."
   href="https://bugs.llvm.org/show_bug.cgi?id=34298#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [Regression] std::function no longer accepts an incomplete return type."
   href="https://bugs.llvm.org/show_bug.cgi?id=34298">bug 34298</a>
              from <span class="vcard"><a class="email" href="mailto:eric@efcs.ca" title="Eric Fiselier <eric@efcs.ca>"> <span class="fn">Eric Fiselier</span></a>
</span></b>
        <pre>(In reply to Richard Smith from <a href="show_bug.cgi?id=34298#c7">comment #7</a>)
<span class="quote">> [res.on.functions]p2:

> "In particular, the effects are undefined [...] if an incomplete type is
> used as a template argument when instantiating a template component, unless
> specifically allowed for that component."

> There does not appear to be any permission granted to use an incomplete type
> as a template argument of std::function<R(ArgTypes...)>, so libc++'s
> behavior seems to be conforming.</span >

@Richard, I'm not sure I agree. The incomplete return type isn't the template
argument, the entire function type is; and the function type itself isn't
incomplete. Obviously std::function<void()> is allowed, and so it seems we
should accept this case as well.

So I don't think this is a extension, but instead required behavior.

@Alex Thanks for the report and original patch. Sorry it took me this long to
get to it.

Fixed in r312890.

This should be backported to 5.0.1, since we unfortunately missed the 5.0
release. @Marshall is that OK with you?</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>