]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/functional/factory/test/factory_with_none_t.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / functional / factory / test / factory_with_none_t.cpp
index bce3b4f2098b1da1481b882d8579ce5fb0d225b0..bdca2c28f6de8b9428e14e1cd914099302b0f952 100644 (file)
@@ -21,6 +21,12 @@ class sum
     operator int() const { return this->val_sum; }
 };
 
+// Suppress warnings about std::auto_ptr.
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
 int main()
 {
     int one = 1, two = 2;
@@ -28,10 +34,23 @@ int main()
       sum* instance( boost::factory< sum*, boost::none_t >()(one,two) );
       BOOST_TEST(*instance == 3);
     }
+#if !defined(BOOST_NO_AUTO_PTR)
     {
       std::auto_ptr<sum> instance(
               boost::factory< std::auto_ptr<sum>, boost::none_t >()(one,two) );
       BOOST_TEST(*instance == 3);
     }
+#endif
+#if !defined(BOOST_NO_CXX11_SMART_PTR)
+    {
+      std::unique_ptr<sum> instance(
+              boost::factory< std::unique_ptr<sum>, boost::none_t >()(one,two) );
+      BOOST_TEST(*instance == 3);
+    }
+#endif
     return boost::report_errors();
 }
+
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif