https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80564
TC <rs2740 at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rs2740 at gmail dot com --- Comment #4 from TC <rs2740 at gmail dot com> --- (In reply to Eric Fiselier from comment #3) > Here is an example of why `_Bind::operator()(...) const` must be considered > during overload resolution even if the call wrapper itself is not const. > > ------------------------------ > #include <functional> > > struct Func { > template <class ...Args> > void operator()(Args&&...) = delete; > > template <class ...Args> > void operator()(Args&&...) const {} > }; > > int main() { > Func f; > std::bind(f)(); > } > ------------------------- Interesting, libstdc++ rejects this as an attempt to call a deleted function. That seems more correct than libc++'s approach which calls the const overload.