]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/nowide/config/check_movable_fstreams.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / nowide / config / check_movable_fstreams.cpp
diff --git a/ceph/src/boost/libs/nowide/config/check_movable_fstreams.cpp b/ceph/src/boost/libs/nowide/config/check_movable_fstreams.cpp
new file mode 100644 (file)
index 0000000..4970d9d
--- /dev/null
@@ -0,0 +1,18 @@
+//
+//  Copyright (c) 2020 Alexander Grund
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE or copy at http://www.boost.org/LICENSE.txt)
+//
+
+#include <fstream>
+#include <utility>
+
+/// Check that the stdlib supports swapping and moving fstreams
+/// (and by extension all other streams and streambufs)
+void check()
+{
+    std::fstream s1, s2;
+    s1.swap(s2);
+    s2 = std::move(s1);
+}