Boost logo

Boost :

Subject: Re: [boost] [variant] address of a variant type from the address of its sub-object?
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2016-04-15 04:12:07

2016-04-14 16:30 GMT+02:00 Steven Watanabe <watanabesj_at_[hidden]>:

> On 04/14/2016 12:39 AM, Andrzej Krzemienski wrote:
> > Hi,
> > Is there a portable way (guaranteed by the interface) to do the
> following?
> >
> > I have an object 'ob' of type Ob and know its address. I know it is an
> > active sub-object of a variant type, where Ob is one of the sub-types. Is
> > there a way to compute the address of the containing variant object?
> >
> No there isn't. It can't work in general because of
> In Christ,
> Steven Watanabe

Thanks. The case may be different for the TR's std::experimental::variant,
though. I will have to try it.


Boost list run by bdawes at, gregod at, cpdaniel at, john at