aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/using3.C
blob: 689770f61c5978cbddda45119dc207d05aa307fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Test for P0195R2 multiple using.
// { dg-options "" }

namespace A {
  int i;
}

namespace A1 {
  using A::i, A::i;	 // OK: double declaration
  // { dg-warning "comma" "" { target c++14_down } .-1 }
}

struct B {
  int i;
};

struct X : B {
  using B::i, B::i; // { dg-error "redeclaration" }
  // { dg-warning "comma" "" { target c++14_down } .-1 }
};