| 1 |
// PR c++/80739 |
| 2 |
// { dg-do compile { target c++14 } } |
| 3 |
|
| 4 |
using size_t = decltype(sizeof(0)); |
| 5 |
template <class T> struct element { |
| 6 |
constexpr element() noexcept: x0(0), x1(0), x2(0), x3(0) {} |
| 7 |
T x0; int x1, x2, x3; |
| 8 |
}; |
| 9 |
template <class T> struct container { |
| 10 |
constexpr container() noexcept: data() {data = element<T>();} |
| 11 |
element<T> data; |
| 12 |
}; |
| 13 |
template <class T> constexpr bool test() { |
| 14 |
return (container<T>(), true); |
| 15 |
} |
| 16 |
int main() { |
| 17 |
constexpr bool tmp0 = test<int>(); |
| 18 |
constexpr bool tmp1 = test<size_t>(); |
| 19 |
return tmp0 && tmp1; |
| 20 |
} |