]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/range/detail/default_constructible_unary_fn.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / range / detail / default_constructible_unary_fn.hpp
index 374ddda15d41bc9b1f9d47b49e0bb3f56232d8c0..9729e3cb8091a5da67738b15a585fade34c0720a 100644 (file)
@@ -32,6 +32,23 @@ public:
         : m_impl(source)
     {
     }
+    default_constructible_unary_fn_wrapper(const default_constructible_unary_fn_wrapper& source)
+        : m_impl(source.m_impl)
+    {
+    }
+    default_constructible_unary_fn_wrapper& operator=(const default_constructible_unary_fn_wrapper& source)
+    {
+        if (source.m_impl)
+        {
+            // Lambda are not copy/move assignable.
+            m_impl.emplace(*source.m_impl);
+        }
+        else
+        {
+            m_impl.reset();
+        }
+        return *this;
+    }
     template<typename Arg>
     R operator()(const Arg& arg) const
     {