| 1 |
// PR c++/80534 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
// { dg-options "" } |
| 4 |
|
| 5 |
template <int, int> struct aligned_storage { |
| 6 |
struct type { |
| 7 |
char __data[0]; |
| 8 |
}; |
| 9 |
}; |
| 10 |
struct A {}; |
| 11 |
template <typename _Tp, typename = _Tp> struct unique_ptr; |
| 12 |
template <typename _Tp, typename _Dp> struct unique_ptr<_Tp[], _Dp> { |
| 13 |
int _M_t; |
| 14 |
void get() { _M_t; } |
| 15 |
}; |
| 16 |
struct B { |
| 17 |
using Association = A; |
| 18 |
using Storage = aligned_storage<sizeof(Association), alignof(Association)>::type; |
| 19 |
using StorageUniquePointer = unique_ptr<Storage[]>; |
| 20 |
void getAssociationsBegin() { storageUniquePointer_.get(); } |
| 21 |
StorageUniquePointer storageUniquePointer_; |
| 22 |
}; |
| 23 |
struct C {}; |
| 24 |
using MainThreadStaticSignalsReceiver = C; |
| 25 |
aligned_storage<sizeof(MainThreadStaticSignalsReceiver), |
| 26 |
alignof(MainThreadStaticSignalsReceiver)>::type |
| 27 |
mainThreadStaticSignalsReceiverStorage; |