]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/move/test/unique_ptr_std_move.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / move / test / unique_ptr_std_move.cpp
diff --git a/ceph/src/boost/libs/move/test/unique_ptr_std_move.cpp b/ceph/src/boost/libs/move/test/unique_ptr_std_move.cpp
new file mode 100644 (file)
index 0000000..1985eb2
--- /dev/null
@@ -0,0 +1,30 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Howard Hinnant 2009
+// (C) Copyright Ion Gaztanaga 2014-2014.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#define BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE
+#include <boost/move/unique_ptr.hpp>
+#include <boost/core/lightweight_test.hpp>
+
+////////////////////////////////
+//             main
+////////////////////////////////
+int main()
+{
+   //Just test compilation errors
+   boost::movelib::unique_ptr<int> a, b(boost::move(a));
+   BOOST_TEST(!(b.get() || a.get()));
+   b = boost::move(a);
+   b.release();
+   BOOST_TEST(!(b.get() || a.get()));
+   //Test results
+   return boost::report_errors();
+}