aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype30.C
blob: 25eeb9d295844df074be617001789a540cb41ae0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/49369
// { dg-do compile { target c++11 } }

template <class,class> struct assert_same;
template <class T> struct assert_same<T,T> {};

struct B {
  int member;
};

struct C: B {
  void method() const;
};

void C::method() const {
  assert_same<decltype((B::member)), const int&> a;
}