]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/move/test/unique_ptr_std_move.cpp
1985eb2f905755d9e2ab4ffa973664071b454f75
[ceph.git] / ceph / src / boost / libs / move / test / unique_ptr_std_move.cpp
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Howard Hinnant 2009
4 // (C) Copyright Ion Gaztanaga 2014-2014.
5 //
6 // Distributed under the Boost Software License, Version 1.0.
7 // (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 //
10 // See http://www.boost.org/libs/move for documentation.
11 //
12 //////////////////////////////////////////////////////////////////////////////
13 #define BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE
14 #include <boost/move/unique_ptr.hpp>
15 #include <boost/core/lightweight_test.hpp>
16
17 ////////////////////////////////
18 // main
19 ////////////////////////////////
20 int main()
21 {
22 //Just test compilation errors
23 boost::movelib::unique_ptr<int> a, b(boost::move(a));
24 BOOST_TEST(!(b.get() || a.get()));
25 b = boost::move(a);
26 b.release();
27 BOOST_TEST(!(b.get() || a.get()));
28 //Test results
29 return boost::report_errors();
30 }