On 07/08/2017 12:42 AM, Phil Bouchard wrote:
On 07/07/2017 10:14 PM, Phil Bouchard wrote:

But if I can do a deep copy then I can certainly "re-set" the variable
(change the set the variable is owned by).  If I can do that then we
won't need any deep copy.

I just need to think a little bit... thanks for your patience.

Yes of course: I just need to add some metadata so the re-setting can
propagate in a specific variable.

I'll work on an engine to demonstrate its validity.

Alright I already got something. If we mimic the Javascript function scope in C++ then we'll have the following:
https://github.com/philippeb8/root_ptr/blob/develop/example/javascript_example1.cpp

The application outputs:
Scope 0: BEGIN
Scope 1: BEGIN
A::A(const boost::node_proxy&)
A::A(const boost::node_proxy&)
A::~A()
Scope 1: END
A::~A()
Scope 0: END

Which is exactly what we want. Note that I didn't stress tested it yet. If you don't mind I will start a new thread with the Boost mailing list to see their opinion.


Thanks,
-Phil

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to