1 // PR c++/70106
2 // { dg-do compile { target c++14 } }
3 
4 template <typename>
5 struct A
6 {
7   int x;
8 
fooA9   void foo () const {
10     (A::x);
11   }
12 };
13 
14 struct B
15 {
16   int x;
17 
18   template <typename>
fooB19   void foo () const {
20     (B::x);
21   }
22 };
23 
24 void
foo()25 foo ()
26 {
27   A<int> ().foo ();
28   B ().foo<int> ();
29 }
30 
31