|
Boost : |
Subject: Re: [boost] [type_traits] Need help with an - unfixable? - issue
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-12-08 11:34:19
John Maddock wrote:
>
> This issue just came in: https://svn.boost.org/trac/boost/ticket/3730
>
> Reduced to the test case below, and I can't see a way to fix this at
> present, anyone any bright ideas?
In case the problem is not clear to anyone...
[extra declarations/definitions removed to focus on virtual inheritance]
> class base {
> public:
> virtual void method1() = 0;
> };
>
> class derived1 : virtual public base {
> };
>
> class derived2 : virtual public base {
> };
>
> class intermediate : public derived1, public derived2 {
> public:
> intermediate(int i) : base(i) {}
>
> void method1();
> };
>
> class final : public intermediate {
> public:
> final(int i) : base(i) {}
> };
Both intermediate and final have a unique override of method1().
> struct X : final, virtual intermediate
> {
> };
X has two intermediate subobjects, so there's no unique override of method1().
The question, then, is how to change is_virtual_base_of to account for this situation. That will require more thought.
_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk