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
To: boost-users@lists.boost.org
Date: 04/08/2012 11:11 PM
Subject: Re: [Boost-users] [Interprocess] Collection of base
shared_ptr
Sent by: boost-users-bounces@lists.boost.org
(on Boost.Variant and dynamic allocation)
On Apr 6, 2012, at 7:45 PM, Aaron_Wright@selinc.com 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.de...
Cheers,
Gordon
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users