Home | History | Annotate | Download | only in optional.object.assign

Lines Matching refs:opt2

52         constexpr optional<int> opt2;
53 opt = std::move(opt2);
54 static_assert(static_cast<bool>(opt2) == false, "");
55 assert(static_cast<bool>(opt) == static_cast<bool>(opt2));
59 constexpr optional<int> opt2(2);
60 opt = std::move(opt2);
61 static_assert(static_cast<bool>(opt2) == true, "");
62 static_assert(*opt2 == 2, "");
63 assert(static_cast<bool>(opt) == static_cast<bool>(opt2));
64 assert(*opt == *opt2);
68 constexpr optional<int> opt2;
69 opt = std::move(opt2);
70 static_assert(static_cast<bool>(opt2) == false, "");
71 assert(static_cast<bool>(opt) == static_cast<bool>(opt2));
75 constexpr optional<int> opt2(2);
76 opt = std::move(opt2);
77 static_assert(static_cast<bool>(opt2) == true, "");
78 static_assert(*opt2 == 2, "");
79 assert(static_cast<bool>(opt) == static_cast<bool>(opt2));
80 assert(*opt == *opt2);
85 optional<X> opt2(X{});
86 assert(static_cast<bool>(opt2) == true);
90 opt = std::move(opt2);