Bug(?) reported by @logan-5.
This is either "oh yeah, sure, trivial, ship it" or "geez this is a really deep open question about the meaning of the standardese" — I'm not sure which. I've posted in #standardese but not otherwise tried to start a discussion/issue yet.
https://eel.is/c++draft/func.wrap.func#general-2
https://eel.is/c++draft/func.require#2
The crux seems to be what [func.require] means by "<expression> implicitly converted to R" — if the type of <expression> is already R, then "implicit conversion to R" is a no-op? Anyway, is_convertible seems to be the wrong tool for that job.
libstdc++ supports std::function<NonCopyable()>; Microsoft STL does not. (This patch would move libc++ from Microsoft's camp to libstdc++'s.)
Lénárd Szolnoki adds: "I wonder if std::function<NonDestructible()> is also legitimate..." All vendors currently agree that it's not. https://godbolt.org/z/rvzWE3
I don't understand why this change is necessary. Can you explain?