aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/class-deduction94.C
blob: f29ebd2c2b8412a3e670fde80105848a5afb3e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/79501
// { dg-do compile { target c++17 } }

struct X {
protected:
  template<class T>
  struct B { T t; };

  template<class T> B(T) -> B<T>;
};

struct Y {
protected:
  template<class T>
  struct B { T t; };

private:
  template<class T> B(T) -> B<T>; // { dg-error "access" }
};