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
c++: constantness of call to function pointer [PR111703]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
diagnostic
/
constexpr4.C
blob
f37c01cac55abf140f44f16fc6070d21055ea6da
1
// Verify we diagnose a call to a non-constant function pointer ahead of time.
2
// { dg-do compile { target c++11 } }
3
4
bool (*f)(int);
5
6
template<int N>
7
void g() {
8
static_assert(f(N), ""); // { dg-error "non-constant|'f' is not usable" }
9
}