aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/static2.C
blob: b87bfec3aaa40774d4803a8bf2ff1f88bf88de5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-additional-options -std=c++17 }

template <class T>
struct A
{
  static constexpr auto x = T::x;
};

struct B;
A<B> a;

struct B
{
  static constexpr auto x = 42;
};

auto x = a.x;