☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-fnptr.C
☽
☼
gcc/testsuite/g++.dg/cpp0x/constexpr-fnptr.C
code
plain
raw
1
// { dg-do compile { target c++11 } }
2
3
constexpr bool is_negative(int x) { return x < 0; }
4
5
constexpr bool check(int x, bool (*p)(int)) { return p(x); } // #1
6
7
static_assert(check(-2, is_negative), "Error");