repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/85765 - SFINAE and non-type default template arg.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-52892-2.C
blob
d2062cee842bd0388d9273030a9f2fb34ec6aa53
1
// PR c++/52892
2
// { dg-do compile { target c++11 } }
3
4
constexpr bool is_negative(int x) { return x < 0; }
5
typedef bool (*Function)(int);
6
constexpr bool check(int x, Function p) { return p(x); }
7
static_assert(check(-2, is_negative), "Error");