Lines Matching refs:MoveOnly
15 struct MoveOnly { struct
17 MoveOnly(MoveOnly const&) = delete; argument
18 MoveOnly& operator=(MoveOnly const&) = delete;
19 MoveOnly(int data) : data_(data) { } in MoveOnly() function
20 MoveOnly(MoveOnly&& x) : data_(x.data_) { x.data_ = 0; } in MoveOnly() argument
22 MoveOnly& operator=(MoveOnly&& x) in operator =() argument
25 bool operator==(const MoveOnly& x) const { return data_ == x.data_; } in operator ==() argument
28 struct MoveOnlyDerived : MoveOnly {
30 MoveOnlyDerived(int data = 1) : MoveOnly(data) { } in MoveOnlyDerived()
55 hana::pair<MoveOnly, short> p1(MoveOnly{3}, 4); in main()
56 hana::pair<MoveOnly, short> p2(std::move(p1)); in main()
57 BOOST_HANA_RUNTIME_CHECK(hana::first(p2) == MoveOnly{3}); in main()
64 hana::pair<MoveOnly, long> p2 = std::move(p1); in main()
65 BOOST_HANA_RUNTIME_CHECK(hana::first(p2) == MoveOnly{3}); in main()