]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/system/test/result_errc_construct.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / system / test / result_errc_construct.cpp
diff --git a/ceph/src/boost/libs/system/test/result_errc_construct.cpp b/ceph/src/boost/libs/system/test/result_errc_construct.cpp
new file mode 100644 (file)
index 0000000..6d45368
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2021 Peter Dimov.
+// Distributed under the Boost Software License, Version 1.0.
+// https://www.boost.org/LICENSE_1_0.txt
+
+#include <boost/system/result.hpp>
+#include <boost/core/lightweight_test_trait.hpp>
+#include <type_traits>
+
+using namespace boost::system;
+
+int main()
+{
+    BOOST_TEST_TRAIT_FALSE((std::is_convertible<errc::errc_t, result<int>>));
+    BOOST_TEST_TRAIT_FALSE((std::is_constructible<result<int>, errc::errc_t>));
+
+    BOOST_TEST_TRAIT_FALSE((std::is_convertible<errc::errc_t, result<double>>));
+    BOOST_TEST_TRAIT_FALSE((std::is_constructible<result<double>, errc::errc_t>));
+
+    BOOST_TEST_TRAIT_FALSE((std::is_convertible<errc::errc_t, result<bool>>));
+    BOOST_TEST_TRAIT_FALSE((std::is_constructible<result<bool>, errc::errc_t>));
+
+    return boost::report_errors();
+}