struct {
constexpr Result<int> operator()() const {
using V = std::variant<int, TCopyAssign, unsigned>;
- V v(std::in_place_type<unsigned>, 43);
+ V v(std::in_place_type<unsigned>, 43u);
V v2(std::in_place_type<TCopyAssign>, 42);
v = v2;
return {v.index(), std::get<1>(v).value};
}
{
using V = std::variant<int, MoveAssign, unsigned>;
- V v1(std::in_place_type<unsigned>, 43);
+ V v1(std::in_place_type<unsigned>, 43u);
V v2(std::in_place_type<MoveAssign>, 42);
MoveAssign::reset();
V &vref = (v1 = std::move(v2));
assert(std::get<2>(v) == &x);
assert(&ref2 == &std::get<2>(v));
// emplace with multiple args
- auto& ref3 = v.emplace<4>(3, 'a');
+ auto& ref3 = v.emplace<4>(3u, 'a');
static_assert(std::is_same_v<std::string&, decltype(ref3)>, "");
assert(std::get<4>(v) == "aaa");
assert(&ref3 == &std::get<4>(v));
assert(std::get<2>(v) == &x);
assert(&ref2 == &std::get<2>(v));
// emplace with multiple args
- auto& ref3 = v.emplace<std::string>(3, 'a');
+ auto& ref3 = v.emplace<std::string>(3u, 'a');
static_assert(std::is_same_v<std::string&, decltype(ref3)>, "");
assert(std::get<4>(v) == "aaa");
assert(&ref3 == &std::get<4>(v));