gcc/testsuite/g++.dg/cpp2a/no_unique_address8.C
raw| 1 | // PR c++/98463 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template <typename T> struct A { constexpr A () : a() {} [[no_unique_address]] T a; }; |
| 5 | template <unsigned long, typename...> struct B; |
| 6 | template <unsigned long T, typename U, typename... V> |
| 7 | struct B<T, U, V...> : B<1, V...>, A<U> {}; |
| 8 | template <unsigned long T, typename U> struct B<T, U> : A<U> {}; |
| 9 | template <typename... h> struct C : B<0, h...> {}; |
| 10 | struct D {}; |
| 11 | struct E { C<int, D> k; virtual ~E (); } a; |