Boost logo

Boost Users :

Subject: Re: [Boost-users] [Interprocess] Collection of base shared_ptr
From: Aaron_Wright_at_[hidden]
Date: 2012-04-10 14:58:41


If I read that web page correctly, the only time raw pointers are used is
when creating a backup for when a copy constructor fails. From the reading
it would seem that the backup point is not persisted. When the copy
constructor fails, the backup is copied off the heap into variant's
storage. When the copy constructor doesn't fail, the backup is discarded.
This raw pointer would only be needed for a small moment in one process.
It would not need to be shared with another process. So variant should
work fine with interprocess.

I'm making some assumptions here that that web page contains everything I
need to know. Am I assuming too much?

---
Aaron Wright
From:   Gordon Woodhull <gordon_at_[hidden]>
To:     boost-users_at_[hidden]
Date:   04/08/2012 11:11 PM
Subject:        Re: [Boost-users] [Interprocess] Collection of base 
shared_ptr
Sent by:        boost-users-bounces_at_[hidden]
(on Boost.Variant and dynamic allocation)
On Apr 6, 2012, at 7:45 PM, Aaron_Wright_at_[hidden] wrote:
Would raw pointers come into play? Would it depend on the contents of the 
structs? 
Looks like you need nothrow copy constructors and to specialize some 
traits to label them as such.
See "Enabling Optimizations" in
http://www.boost.org/doc/libs/1_49_0/doc/html/variant/design.html#variant.design.never-empty
Cheers,
Gordon
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net