https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90556 Bug 90556 depends on bug 70692, which changed state.
Bug 70692 Summary: No warning when std::function<const int&(...)> binds a reference to a temporary https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70692 What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED