blob: b15208a25317b69c99dc1f3a5c35e6c083cb74ac [file] [log] [blame]
// { dg-do compile { target c++11 } }
// { dg-require-effective-target hosted }
// PR libstdc++/70692
// No warning when function<const int&(...)> binds a reference to a temporary
#include <functional>
int f();
int main()
{
std::function<const int&()> ff(f); // { dg-error "no matching function" }
std::function<long&&()> f2(f); // { dg-error "no matching function" }
}
// { dg-error "std::(__8::)?enable_if" "" { target *-*-* } 0 }