https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111327
Jiang An <de34 at live dot cn> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |de34 at live dot cn --- Comment #5 from Jiang An <de34 at live dot cn> --- The current fix doesn't seem sufficient (https://godbolt.org/z/rs5oYxjTc): #include <functional> #include <utility> struct Weird { void operator()() {} bool operator()() const { return true; } }; int main() { auto nf = std::not_fn(Weird{}); nf(); // should be rejected, but calls the const overload std::as_const(nf)(); }