PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / template / ptrmem27.C
blob8c63f9c2974ea473e73faf1953b07217ebf6787a
1 // PR c++/61500
3 struct X {
4   int i;
5   int j;
7   int foo(int X::* ptr);
9   template <int X::* ptr>
10   int bar();
13 int X::foo(int X::* ptr) {
14   int* p = &(this->*ptr);  // OK.
15   return *p;
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;