summaryrefslogtreecommitdiff
path: root/src/bindings/cxx/eo_cxx/eo_wref.hh
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-02 14:26:59 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-07 09:57:24 +0900
commit8c991b104ce23152eeab7132bee3c3ae78fef4c4 (patch)
treeef37b705ade3d030fc475d9c8e79405184d1371b /src/bindings/cxx/eo_cxx/eo_wref.hh
parent0d1a2db61756cdf361d63869ab1309b7bb91f289 (diff)
cxx: Add nullptr constructor for weak refs
This allows constructs such as: wref_obj = obj; ... wref_obj = nullptr;
Diffstat (limited to 'src/bindings/cxx/eo_cxx/eo_wref.hh')
-rw-r--r--src/bindings/cxx/eo_cxx/eo_wref.hh8
1 files changed, 8 insertions, 0 deletions
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
27 wref() : _eo_wref(nullptr) 27 wref() : _eo_wref(nullptr)
28 { 28 {
29 } 29 }
30
31 /// @brief Empty constructor on nullptr.
32 ///
33 /// Create a empty weak reference.
34 ///
35 wref(std::nullptr_t) : _eo_wref(nullptr)
36 {
37 }
30 38
31 /// @brief Class constructor. 39 /// @brief Class constructor.
32 /// 40 ///