Lines Matching refs:swap

12 // template <class T> void swap(optional<T>& x, optional<T>& y)
13 // noexcept(noexcept(x.swap(y)));
48 friend void swap(Y& x, Y& y) {std::swap(x.i_, y.i_);}
61 friend void swap(Z& x, Z& y) {throw 6;}
73 static_assert(noexcept(swap(opt1, opt2)) == true, "");
76 swap(opt1, opt2);
83 static_assert(noexcept(swap(opt1, opt2)) == true, "");
87 swap(opt1, opt2);
95 static_assert(noexcept(swap(opt1, opt2)) == true, "");
99 swap(opt1, opt2);
107 static_assert(noexcept(swap(opt1, opt2)) == true, "");
112 swap(opt1, opt2);
121 static_assert(noexcept(swap(opt1, opt2)) == true, "");
124 swap(opt1, opt2);
132 static_assert(noexcept(swap(opt1, opt2)) == true, "");
137 swap(opt1, opt2);
146 static_assert(noexcept(swap(opt1, opt2)) == true, "");
151 swap(opt1, opt2);
160 static_assert(noexcept(swap(opt1, opt2)) == true, "");
166 swap(opt1, opt2);
167 assert(X::dtor_called == 1); // from inside std::swap
176 static_assert(noexcept(swap(opt1, opt2)) == false, "");
179 swap(opt1, opt2);
187 static_assert(noexcept(swap(opt1, opt2)) == false, "");
192 swap(opt1, opt2);
201 static_assert(noexcept(swap(opt1, opt2)) == false, "");
206 swap(opt1, opt2);
215 static_assert(noexcept(swap(opt1, opt2)) == false, "");
221 swap(opt1, opt2);
231 static_assert(noexcept(swap(opt1, opt2)) == false, "");
234 swap(opt1, opt2);
242 static_assert(noexcept(swap(opt1, opt2)) == false, "");
248 swap(opt1, opt2);
263 static_assert(noexcept(swap(opt1, opt2)) == false, "");
269 swap(opt1, opt2);
285 static_assert(noexcept(swap(opt1, opt2)) == false, "");
292 swap(opt1, opt2);