Boost logo

Boost :

Subject: [boost] Question about the weak_ptr constructor with lock() call
From: He-Jie Shih (bignose1007_at_[hidden])
Date: 2016-04-20 05:16:13


Hi all,

I have question about this line:
https://github.com/boostorg/smart_ptr/blob/develop/include/boost/smart_ptr/weak_ptr.hpp#L67

I still can't understand the sentence:
// r.px may already have been invalidated. The px(r.px)
// conversion may require access to *r.px (virtual inheritance).

The px is just a scalar. Why assigning the scalar will require the
de-reference operator? The comment says it's in virtual inheritance, but I
still have not idea about it.

Thanks,
Jerry


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk