[libcxx-commits] [PATCH] D60393: Force is_invocable template parameters to be complete types

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 10 14:19:59 PDT 2019


ldionne added a comment.

In D60393#1460732 <https://reviews.llvm.org/D60393#1460732>, @EricWF wrote:

> In D60393#1460727 <https://reviews.llvm.org/D60393#1460727>, @zoecarver wrote:
>
> > Your right, PR41360 is only a wording issue. I also agree `__flexible_invokable` is bad, but I don't see another way to check invokability while allowing incomplete types (which I think is necessary for containers).
>
>
> I'm not sure it's necessary, but the way libstdc++ addressed this seems preferable. They moved the triggering of the diagnostic into the destructor. Which meant the types couldn't be incomplete when it was evaluated.
>  This used to be what we did, but @ldionne reverted it in r348529 to improve the diagnostic message. I think we should revert that commit.


I think we should move my check back to the destructor, yes. However, reverting the commit as a whole results in worse error messages. You can retain slightly better error messages AND avoid crazy forward declarations AND fix the issue discussed in PR41360. I'll submit a patch.


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60393/new/

https://reviews.llvm.org/D60393





More information about the libcxx-commits mailing list