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
Update ChangeLog and version files for release
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
ptrmem27.C
blob
8c63f9c2974ea473e73faf1953b07217ebf6787a
1
// PR c++/61500
2
3
struct X {
4
int i;
5
int j;
6
7
int foo(int X::* ptr);
8
9
template <int X::* ptr>
10
int bar();
11
};
12
13
int X::foo(int X::* ptr) {
14
int* p = &(this->*ptr); // OK.
15
return *p;
16
}
17
18
template <int X::* ptr>
19
int X::bar() {
20
int* p = &(this->*ptr); // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
21
return *p;
22
}