diff --git a/flang/include/flang/Common/uint128.h b/flang/include/flang/Common/uint128.h index 68098da282f29..adbeeb3fe6fd3 100644 --- a/flang/include/flang/Common/uint128.h +++ b/flang/include/flang/Common/uint128.h @@ -47,16 +47,19 @@ template class Int128 { constexpr Int128 &operator=(const Int128 &) = default; constexpr Int128 &operator=(Int128 &&) = default; - constexpr Int128(const Int128 &n) + explicit constexpr Int128(const Int128 &n) + : low_{n.low()}, high_{n.high()} {} + explicit constexpr Int128(Int128 &&n) : low_{n.low()}, high_{n.high()} {} - constexpr Int128(Int128 &&n) : low_{n.low()}, high_{n.high()} {} constexpr Int128 &operator=(const Int128 &n) { low_ = n.low(); high_ = n.high(); + return *this; } constexpr Int128 &operator=(Int128 &&n) { low_ = n.low(); high_ = n.high(); + return *this; } constexpr Int128 operator+() const { return *this; }