| 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // UNSUPPORTED: c++03, c++11 |
| 10 | |
| 11 | // <propagate_const> |
| 12 | |
| 13 | // template <class U> propagate_const& propagate_const::operator=(propagate_const<U>&&); |
| 14 | |
| 15 | #include <experimental/propagate_const> |
| 16 | #include <cassert> |
| 17 | #include <utility> |
| 18 | |
| 19 | #include "test_macros.h" |
| 20 | #include "propagate_const_helpers.h" |
| 21 | |
| 22 | using std::experimental::propagate_const; |
| 23 | |
| 24 | int main(int, char**) { |
| 25 | |
| 26 | typedef propagate_const<X> P; |
| 27 | |
| 28 | P p1(1); |
| 29 | P p2(2); |
| 30 | |
| 31 | p2=std::move(p1); |
| 32 | |
| 33 | assert(*p2==1); |
| 34 | |
| 35 | return 0; |
| 36 | } |
| 37 | |