[flang] Fix Windows build
A recently added class constructor needs to be "explicit" to
prevent it from being available for use as a conversion, which
is breaking the MSVC build of flang.
GitOrigin-RevId: 02410df530fbef5256711ec2220c4c34468c894c
diff --git a/include/flang/Common/uint128.h b/include/flang/Common/uint128.h
index 68098da..adbeeb3 100644
--- a/include/flang/Common/uint128.h
+++ b/include/flang/Common/uint128.h
@@ -47,16 +47,19 @@
constexpr Int128 &operator=(const Int128 &) = default;
constexpr Int128 &operator=(Int128 &&) = default;
- constexpr Int128(const Int128<!IS_SIGNED> &n)
+ explicit constexpr Int128(const Int128<!IS_SIGNED> &n)
: low_{n.low()}, high_{n.high()} {}
- constexpr Int128(Int128<!IS_SIGNED> &&n) : low_{n.low()}, high_{n.high()} {}
+ explicit constexpr Int128(Int128<!IS_SIGNED> &&n)
+ : low_{n.low()}, high_{n.high()} {}
constexpr Int128 &operator=(const Int128<!IS_SIGNED> &n) {
low_ = n.low();
high_ = n.high();
+ return *this;
}
constexpr Int128 &operator=(Int128<!IS_SIGNED> &&n) {
low_ = n.low();
high_ = n.high();
+ return *this;
}
constexpr Int128 operator+() const { return *this; }