repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ipa-cp: Perform operations in the appropriate types (PR 118097)
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
ptrmem33.C
blob
dca741ae5e2a793acb7199bf3faa6efbe2a947f9
1
// PR c++/108104
2
// { dg-do compile { target c++11 } }
3
4
struct A {
5
void x();
6
void y();
7
};
8
9
enum State { On };
10
11
template<State state, void (A::*)()>
12
struct B {
13
static void f();
14
};
15
16
template<State state>
17
struct B<state, nullptr> {
18
static void g();
19
};
20
21
template<State state>
22
struct B<state, &A::y> {
23
static void h();
24
};
25
26
int main() {
27
B<State::On, &A::x>::f();
28
B<State::On, nullptr>::g();
29
B<State::On, &A::y>::h();
30
}