Home | History | Annotate | Download | only in optional.specalg

Lines Matching refs:opt2

69         optional<int> opt2;
70 static_assert(noexcept(swap(opt1, opt2)) == true, "");
72 assert(static_cast<bool>(opt2) == false);
73 swap(opt1, opt2);
75 assert(static_cast<bool>(opt2) == false);
79 optional<int> opt2;
80 static_assert(noexcept(swap(opt1, opt2)) == true, "");
83 assert(static_cast<bool>(opt2) == false);
84 swap(opt1, opt2);
86 assert(static_cast<bool>(opt2) == true);
87 assert(*opt2 == 1);
91 optional<int> opt2(2);
92 static_assert(noexcept(swap(opt1, opt2)) == true, "");
94 assert(static_cast<bool>(opt2) == true);
95 assert(*opt2 == 2);
96 swap(opt1, opt2);
99 assert(static_cast<bool>(opt2) == false);
103 optional<int> opt2(2);
104 static_assert(noexcept(swap(opt1, opt2)) == true, "");
107 assert(static_cast<bool>(opt2) == true);
108 assert(*opt2 == 2);
109 swap(opt1, opt2);
112 assert(static_cast<bool>(opt2) == true);
113 assert(*opt2 == 1);
117 optional<X> opt2;
118 static_assert(noexcept(swap(opt1, opt2)) == true, "");
120 assert(static_cast<bool>(opt2) == false);
121 swap(opt1, opt2);
123 assert(static_cast<bool>(opt2) == false);
128 optional<X> opt2;
129 static_assert(noexcept(swap(opt1, opt2)) == true, "");
132 assert(static_cast<bool>(opt2) == false);
134 swap(opt1, opt2);
137 assert(static_cast<bool>(opt2) == true);
138 assert(*opt2 == 1);
142 optional<X> opt2(2);
143 static_assert(noexcept(swap(opt1, opt2)) == true, "");
145 assert(static_cast<bool>(opt2) == true);
146 assert(*opt2 == 2);
148 swap(opt1, opt2);
152 assert(static_cast<bool>(opt2) == false);
156 optional<X> opt2(2);
157 static_assert(noexcept(swap(opt1, opt2)) == true, "");
160 assert(static_cast<bool>(opt2) == true);
161 assert(*opt2 == 2);
163 swap(opt1, opt2);
167 assert(static_cast<bool>(opt2) == true);
168 assert(*opt2 == 1);
172 optional<Y> opt2;
173 static_assert(noexcept(swap(opt1, opt2)) == false, "");
175 assert(static_cast<bool>(opt2) == false);
176 swap(opt1, opt2);
178 assert(static_cast<bool>(opt2) == false);
183 optional<Y> opt2;
184 static_assert(noexcept(swap(opt1, opt2)) == false, "");
187 assert(static_cast<bool>(opt2) == false);
189 swap(opt1, opt2);
192 assert(static_cast<bool>(opt2) == true);
193 assert(*opt2 == 1);
197 optional<Y> opt2(2);
198 static_assert(noexcept(swap(opt1, opt2)) == false, "");
200 assert(static_cast<bool>(opt2) == true);
201 assert(*opt2 == 2);
203 swap(opt1, opt2);
207 assert(static_cast<bool>(opt2) == false);
211 optional<Y> opt2(2);
212 static_assert(noexcept(swap(opt1, opt2)) == false, "");
215 assert(static_cast<bool>(opt2) == true);
216 assert(*opt2 == 2);
218 swap(opt1, opt2);
222 assert(static_cast<bool>(opt2) == true);
223 assert(*opt2 == 1);
227 optional<Z> opt2;
228 static_assert(noexcept(swap(opt1, opt2)) == false, "");
230 assert(static_cast<bool>(opt2) == false);
231 swap(opt1, opt2);
233 assert(static_cast<bool>(opt2) == false);
239 optional<Z> opt2;
240 static_assert(noexcept(swap(opt1, opt2)) == false, "");
243 assert(static_cast<bool>(opt2) == false);
246 swap(opt1, opt2);
255 assert(static_cast<bool>(opt2) == false);
259 optional<Z> opt2;
260 opt2.emplace(2);
261 static_assert(noexcept(swap(opt1, opt2)) == false, "");
263 assert(static_cast<bool>(opt2) == true);
264 assert(*opt2 == 2);
267 swap(opt1, opt2);
275 assert(static_cast<bool>(opt2) == true);
276 assert(*opt2 == 2);
281 optional<Z> opt2;
282 opt2.emplace(2);
283 static_assert(noexcept(swap(opt1, opt2)) == false, "");
286 assert(static_cast<bool>(opt2) == true);
287 assert(*opt2 == 2);
290 swap(opt1, opt2);
299 assert(static_cast<bool>(opt2) == true);
300 assert(*opt2 == 2);