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

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 9 22:34:06 PDT 2019


EricWF added a comment.

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.

> As for `__invokable_r`, I think the two options are either ignore the UB or implement some version of `__complete_type`. I was just going off what the comment said needed to be done.

We had a `__check_complete` implementation previously. I removed it because it's near impossible to correctly check that *all* the types are complete in a call expression. See llvm.org/PR37407 and r332040.


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