User Tools

Site Tools


cplusplus:goingnative2013

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cplusplus:goingnative2013 [2017/10/20 18:03] dblumecplusplus:goingnative2013 [2023/04/12 20:44] (current) – external edit 127.0.0.1
Line 83: Line 83:
  
     std::bind(f, std::weak_ptr<Object>(n));     std::bind(f, std::weak_ptr<Object>(n));
-    +
 is not the same as this code: is not the same as this code:
  
     [n]{ f(std::weak_ptr<Object>(n)); }     [n]{ f(std::weak_ptr<Object>(n)); }
-    +
 The above code will bind the shared_ptr<Node> into the lambda's capture, extending the lifetime. The above code will bind the shared_ptr<Node> into the lambda's capture, extending the lifetime.
 But it is the same as this: But it is the same as this:
cplusplus/goingnative2013.1508547815.txt.gz · Last modified: 2023/04/12 20:44 (external edit)