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 tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-loop5.C
blob
02f372d98887ed7b100133238daea6427a197667
1
// PR c++/68530
2
// { dg-do compile { target c++14 } }
3
4
struct thing {
5
void foo() {}
6
};
7
8
template<typename>
9
constexpr int count()
10
{
11
auto item = thing {};
12
for(; (item.foo(), false);); // { dg-error "foo" }
13
return 0;
14
}
15
16
int main()
17
{
18
static_assert( count<int>() == 0, "" ); // { dg-error "" }
19
}