]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/20_util/function/cons/70692.cc
libstdc++: Disable hosted-only tests [PR103626]
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / function / cons / 70692.cc
CommitLineData
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
7int f();
8
9int 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 }