15 Apr
2016
15 Apr
'16
8:12 a.m.
2016-04-14 16:30 GMT+02:00 Steven Watanabe
AMDG
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
http://www.boost.org/doc/html/variant/design.html#variant.design.never-empty...
In Christ, Steven Watanabe
Thanks. The case may be different for the TR's std::experimental::variant, though. I will have to try it. Regards, &rzej