]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/test/set/cnstr.move.cpp
1 // Copyright Louis Dionne 2013-2016
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
5 #include <boost/hana/bool.hpp>
6 #include <boost/hana/fwd/hash.hpp>
7 #include <boost/hana/set.hpp>
8 #include <boost/hana/type.hpp>
10 #include <support/constexpr_move_only.hpp>
11 #include <support/tracked_move_only.hpp>
14 namespace hana
= boost::hana
;
17 constexpr bool in_constexpr_context() {
18 auto t0
= hana::make_set(ConstexprMoveOnly
<2>{}, ConstexprMoveOnly
<3>{});
19 auto t_implicit
= std::move(t0
);
20 auto t_explicit(std::move(t_implicit
));
27 static_assert(in_constexpr_context(), "");
32 auto t0
= hana::make_set();
33 auto t_implicit
= std::move(t0
);
34 auto t_explicit(std::move(t_implicit
));
40 auto t0
= hana::make_set(TrackedMoveOnly
<1>{});
41 auto t_implicit
= std::move(t0
);
42 auto t_explicit(std::move(t_implicit
));
48 auto t0
= hana::make_set(TrackedMoveOnly
<1>{}, TrackedMoveOnly
<2>{});
49 auto t_implicit
= std::move(t0
);
50 auto t_explicit(std::move(t_implicit
));
56 auto t0
= hana::make_set(TrackedMoveOnly
<1>{}, TrackedMoveOnly
<2>{}, TrackedMoveOnly
<3>{});
57 auto t_implicit
= std::move(t0
);
58 auto t_explicit(std::move(t_implicit
));