Lines Matching refs:opt1
117 optional<int> opt1; in main() local
119 static_assert(noexcept(swap(opt1, opt2)) == true, ""); in main()
120 assert(static_cast<bool>(opt1) == false); in main()
122 swap(opt1, opt2); in main()
123 assert(static_cast<bool>(opt1) == false); in main()
127 optional<int> opt1(1); in main() local
129 static_assert(noexcept(swap(opt1, opt2)) == true, ""); in main()
130 assert(static_cast<bool>(opt1) == true); in main()
131 assert(*opt1 == 1); in main()
133 swap(opt1, opt2); in main()
134 assert(static_cast<bool>(opt1) == false); in main()
139 optional<int> opt1; in main() local
141 static_assert(noexcept(swap(opt1, opt2)) == true, ""); in main()
142 assert(static_cast<bool>(opt1) == false); in main()
145 swap(opt1, opt2); in main()
146 assert(static_cast<bool>(opt1) == true); in main()
147 assert(*opt1 == 2); in main()
151 optional<int> opt1(1); in main() local
153 static_assert(noexcept(swap(opt1, opt2)) == true, ""); in main()
154 assert(static_cast<bool>(opt1) == true); in main()
155 assert(*opt1 == 1); in main()
158 swap(opt1, opt2); in main()
159 assert(static_cast<bool>(opt1) == true); in main()
160 assert(*opt1 == 2); in main()
165 optional<X> opt1; in main() local
167 static_assert(noexcept(swap(opt1, opt2)) == true, ""); in main()
168 assert(static_cast<bool>(opt1) == false); in main()
170 swap(opt1, opt2); in main()
171 assert(static_cast<bool>(opt1) == false); in main()
176 optional<X> opt1(1); in main() local
178 static_assert(noexcept(swap(opt1, opt2)) == true, ""); in main()
179 assert(static_cast<bool>(opt1) == true); in main()
180 assert(*opt1 == 1); in main()
183 swap(opt1, opt2); in main()
185 assert(static_cast<bool>(opt1) == false); in main()
190 optional<X> opt1; in main() local
192 static_assert(noexcept(swap(opt1, opt2)) == true, ""); in main()
193 assert(static_cast<bool>(opt1) == false); in main()
197 swap(opt1, opt2); in main()
199 assert(static_cast<bool>(opt1) == true); in main()
200 assert(*opt1 == 2); in main()
204 optional<X> opt1(1); in main() local
206 static_assert(noexcept(swap(opt1, opt2)) == true, ""); in main()
207 assert(static_cast<bool>(opt1) == true); in main()
208 assert(*opt1 == 1); in main()
212 swap(opt1, opt2); in main()
214 assert(static_cast<bool>(opt1) == true); in main()
215 assert(*opt1 == 2); in main()
220 optional<Y> opt1; in main() local
222 static_assert(noexcept(swap(opt1, opt2)) == false, ""); in main()
223 assert(static_cast<bool>(opt1) == false); in main()
225 swap(opt1, opt2); in main()
226 assert(static_cast<bool>(opt1) == false); in main()
231 optional<Y> opt1(1); in main() local
233 static_assert(noexcept(swap(opt1, opt2)) == false, ""); in main()
234 assert(static_cast<bool>(opt1) == true); in main()
235 assert(*opt1 == 1); in main()
238 swap(opt1, opt2); in main()
240 assert(static_cast<bool>(opt1) == false); in main()
245 optional<Y> opt1; in main() local
247 static_assert(noexcept(swap(opt1, opt2)) == false, ""); in main()
248 assert(static_cast<bool>(opt1) == false); in main()
252 swap(opt1, opt2); in main()
254 assert(static_cast<bool>(opt1) == true); in main()
255 assert(*opt1 == 2); in main()
259 optional<Y> opt1(1); in main() local
261 static_assert(noexcept(swap(opt1, opt2)) == false, ""); in main()
262 assert(static_cast<bool>(opt1) == true); in main()
263 assert(*opt1 == 1); in main()
267 swap(opt1, opt2); in main()
269 assert(static_cast<bool>(opt1) == true); in main()
270 assert(*opt1 == 2); in main()
275 optional<Z> opt1; in main() local
277 static_assert(noexcept(swap(opt1, opt2)) == false, ""); in main()
278 assert(static_cast<bool>(opt1) == false); in main()
280 swap(opt1, opt2); in main()
281 assert(static_cast<bool>(opt1) == false); in main()
286 optional<Z> opt1; in main() local
287 opt1.emplace(1); in main()
289 static_assert(noexcept(swap(opt1, opt2)) == false, ""); in main()
290 assert(static_cast<bool>(opt1) == true); in main()
291 assert(*opt1 == 1); in main()
295 swap(opt1, opt2); in main()
302 assert(static_cast<bool>(opt1) == true); in main()
303 assert(*opt1 == 1); in main()
307 optional<Z> opt1; in main() local
310 static_assert(noexcept(swap(opt1, opt2)) == false, ""); in main()
311 assert(static_cast<bool>(opt1) == false); in main()
316 swap(opt1, opt2); in main()
323 assert(static_cast<bool>(opt1) == false); in main()
328 optional<Z> opt1; in main() local
329 opt1.emplace(1); in main()
332 static_assert(noexcept(swap(opt1, opt2)) == false, ""); in main()
333 assert(static_cast<bool>(opt1) == true); in main()
334 assert(*opt1 == 1); in main()
339 swap(opt1, opt2); in main()
346 assert(static_cast<bool>(opt1) == true); in main()
347 assert(*opt1 == 1); in main()