https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68515
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- I think it's a front-end problem, it (rightly) says that F(X) is not a valid function type, because functions can't return abstract types. The problem is that we don't really have (or want) a function of that type, it's just the notational trick used by result_of.