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

Lines Matching refs:opt2

118         optional<int> opt2;
119 static_assert(noexcept(swap(opt1, opt2)) == true, "");
121 assert(static_cast<bool>(opt2) == false);
122 swap(opt1, opt2);
124 assert(static_cast<bool>(opt2) == false);
128 optional<int> opt2;
129 static_assert(noexcept(swap(opt1, opt2)) == true, "");
132 assert(static_cast<bool>(opt2) == false);
133 swap(opt1, opt2);
135 assert(static_cast<bool>(opt2) == true);
136 assert(*opt2 == 1);
140 optional<int> opt2(2);
141 static_assert(noexcept(swap(opt1, opt2)) == true, "");
143 assert(static_cast<bool>(opt2) == true);
144 assert(*opt2 == 2);
145 swap(opt1, opt2);
148 assert(static_cast<bool>(opt2) == false);
152 optional<int> opt2(2);
153 static_assert(noexcept(swap(opt1, opt2)) == true, "");
156 assert(static_cast<bool>(opt2) == true);
157 assert(*opt2 == 2);
158 swap(opt1, opt2);
161 assert(static_cast<bool>(opt2) == true);
162 assert(*opt2 == 1);
166 optional<X> opt2;
167 static_assert(noexcept(swap(opt1, opt2)) == true, "");
169 assert(static_cast<bool>(opt2) == false);
170 swap(opt1, opt2);
172 assert(static_cast<bool>(opt2) == false);
177 optional<X> opt2;
178 static_assert(noexcept(swap(opt1, opt2)) == true, "");
181 assert(static_cast<bool>(opt2) == false);
183 swap(opt1, opt2);
186 assert(static_cast<bool>(opt2) == true);
187 assert(*opt2 == 1);
191 optional<X> opt2(2);
192 static_assert(noexcept(swap(opt1, opt2)) == true, "");
194 assert(static_cast<bool>(opt2) == true);
195 assert(*opt2 == 2);
197 swap(opt1, opt2);
201 assert(static_cast<bool>(opt2) == false);
205 optional<X> opt2(2);
206 static_assert(noexcept(swap(opt1, opt2)) == true, "");
209 assert(static_cast<bool>(opt2) == true);
210 assert(*opt2 == 2);
212 swap(opt1, opt2);
216 assert(static_cast<bool>(opt2) == true);
217 assert(*opt2 == 1);
221 optional<Y> opt2;
222 static_assert(noexcept(swap(opt1, opt2)) == false, "");
224 assert(static_cast<bool>(opt2) == false);
225 swap(opt1, opt2);
227 assert(static_cast<bool>(opt2) == false);
232 optional<Y> opt2;
233 static_assert(noexcept(swap(opt1, opt2)) == false, "");
236 assert(static_cast<bool>(opt2) == false);
238 swap(opt1, opt2);
241 assert(static_cast<bool>(opt2) == true);
242 assert(*opt2 == 1);
246 optional<Y> opt2(2);
247 static_assert(noexcept(swap(opt1, opt2)) == false, "");
249 assert(static_cast<bool>(opt2) == true);
250 assert(*opt2 == 2);
252 swap(opt1, opt2);
256 assert(static_cast<bool>(opt2) == false);
260 optional<Y> opt2(2);
261 static_assert(noexcept(swap(opt1, opt2)) == false, "");
264 assert(static_cast<bool>(opt2) == true);
265 assert(*opt2 == 2);
267 swap(opt1, opt2);
271 assert(static_cast<bool>(opt2) == true);
272 assert(*opt2 == 1);
276 optional<Z> opt2;
277 static_assert(noexcept(swap(opt1, opt2)) == false, "");
279 assert(static_cast<bool>(opt2) == false);
280 swap(opt1, opt2);
282 assert(static_cast<bool>(opt2) == false);
288 optional<Z> opt2;
289 static_assert(noexcept(swap(opt1, opt2)) == false, "");
292 assert(static_cast<bool>(opt2) == false);
295 swap(opt1, opt2);
304 assert(static_cast<bool>(opt2) == false);
308 optional<Z> opt2;
309 opt2.emplace(2);
310 static_assert(noexcept(swap(opt1, opt2)) == false, "");
312 assert(static_cast<bool>(opt2) == true);
313 assert(*opt2 == 2);
316 swap(opt1, opt2);
324 assert(static_cast<bool>(opt2) == true);
325 assert(*opt2 == 2);
330 optional<Z> opt2;
331 opt2.emplace(2);
332 static_assert(noexcept(swap(opt1, opt2)) == false, "");
335 assert(static_cast<bool>(opt2) == true);
336 assert(*opt2 == 2);
339 swap(opt1, opt2);
348 assert(static_cast<bool>(opt2) == true);
349 assert(*opt2 == 2);