https://bugs.llvm.org/show_bug.cgi?id=34298

Eric Fiselier <e...@efcs.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |e...@efcs.ca
         Resolution|---                         |FIXED

--- Comment #9 from Eric Fiselier <e...@efcs.ca> ---
(In reply to Richard Smith from comment #7)
> [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.

@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?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to