| 1 |
// PR c++/84494 |
| 2 |
// { dg-do compile { target c++14 } } |
| 3 |
|
| 4 |
struct X { |
| 5 |
constexpr X() = default; |
| 6 |
constexpr X(int x) : m_value(x) {} |
| 7 |
constexpr X& operator=(const X &o) = default; |
| 8 |
int m_value {}; |
| 9 |
}; |
| 10 |
|
| 11 |
static_assert((X() = X(10)).m_value == 10, ""); |