// { dg-do compile { target c++11 } } // { dg-require-effective-target hosted } // PR libstdc++/70692 // No warning when function binds a reference to a temporary #include int f(); int main() { std::function ff(f); // { dg-error "no matching function" } std::function f2(f); // { dg-error "no matching function" } } // { dg-error "std::(__8::)?enable_if" "" { target *-*-* } 0 }