-// Copyright (C) 2010-2012 Free Software Foundation, Inc.
+// Copyright (C) 2010-2020 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// 20.8.9 Function template bind
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-options "-fno-show-column" }
+// { dg-do compile { target c++11 } }
#include <functional>
{
const int dummy = 0;
std::bind(&inc, _1)(0); // { dg-error "no match" }
- // { dg-error "rvalue|const" "" { target *-*-* } 1347 }
- // { dg-error "rvalue|const" "" { target *-*-* } 1361 }
- // { dg-error "rvalue|const" "" { target *-*-* } 1375 }
- // { dg-error "rvalue|const" "" { target *-*-* } 1389 }
std::bind(&inc, std::ref(dummy))(); // { dg-error "no match" }
}
std::bind(&Inc::f, Inc(), std::ref(dummy))(); // { dg-error "no match" }
}
+// Ignore the reasons for deduction/substitution failure in the headers.
+// { dg-prune-output "/include/(functional|bits/invoke.h):" }
+
int main()
{
test01();