]>
Commit | Line | Data |
---|---|---|
fa9bda3e | 1 | // { dg-do compile { target c++11 } } |
7cc9022f | 2 | // { dg-require-effective-target hosted } |
fa9bda3e JW |
3 | // PR libstdc++/70692 |
4 | // No warning when function<const int&(...)> binds a reference to a temporary | |
5 | #include <functional> | |
6 | ||
7 | int f(); | |
8 | ||
9 | int main() | |
10 | { | |
11 | std::function<const int&()> ff(f); // { dg-error "no matching function" } | |
12 | std::function<long&&()> f2(f); // { dg-error "no matching function" } | |
13 | } | |
14 | // { dg-error "std::enable_if" "" { target *-*-* } 0 } |