jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8c991b104ce23152eeab7132bee3c3ae78fef4c4

commit 8c991b104ce23152eeab7132bee3c3ae78fef4c4
Author: Jean-Philippe Andre <[email protected]>
Date:   Thu Nov 2 14:26:59 2017 +0900

    cxx: Add nullptr constructor for weak refs
    
    This allows constructs such as:
    
      wref_obj = obj;
      ...
      wref_obj = nullptr;
---
 src/bindings/cxx/eo_cxx/eo_wref.hh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/bindings/cxx/eo_cxx/eo_wref.hh 
b/src/bindings/cxx/eo_cxx/eo_wref.hh
index fc32e47616..048ffcaa0f 100644
--- a/src/bindings/cxx/eo_cxx/eo_wref.hh
+++ b/src/bindings/cxx/eo_cxx/eo_wref.hh
@@ -27,6 +27,14 @@ struct wref
    wref() : _eo_wref(nullptr)
    {
    }
+
+   /// @brief Empty constructor on nullptr.
+   ///
+   /// Create a empty weak reference.
+   ///
+   wref(std::nullptr_t) : _eo_wref(nullptr)
+   {
+   }
   
    /// @brief Class constructor.
    ///

-- 


Reply via email to