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++: P0847R7 (deducing this) - xobj lambdas. [PR102609]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp2a
/
nontype-class54.C
blob
8127b1f54267257d8369f5abd5df938fe8303f50
1
// PR c++/104278
2
// { dg-do compile { target c++20 } }
3
4
struct foo {
5
int value;
6
constexpr foo modify() const { return { value + 1 }; }
7
};
8
9
template<foo f, bool Enable = f.value & 1>
10
struct bar {
11
static void run() { }
12
};
13
14
template<foo f>
15
struct qux {
16
static void run() {
17
bar<f.modify()>::run();
18
}
19
};
20
21
int main() {
22
qux<foo{}>::run();
23
}