Menu

#53 virtual specifiers do not work with deep inheritance

1.0.0
accepted
None
Implementation
minor
0.4.0
defect
2012-09-10
2012-05-18
No

Check if subcontracting works directly with deep inheritance:

struct x {
   virtual void f ( void ) ;
};

struct y : x {
   virtual void g ( void ) ;
};

struct z : y {
   virtual void g ( void ) ; // This subcontract from y::g but...
   virtual void f ( void ) ; // ... does this subcontract from x::f?
};

Discussion

  • Lorenzo Caminiti

    • priority changed from critical to major
    • summary changed from does subcontracting work with deep inheritance? to virtual specifiers do not work with deep inheritance
    • milestone changed from 1-Release to 2-Future

    Yes, subcontracting woks with deep inheritance (because each base checks all its bases, etc).

    However, that deep check is not done by bases for virtual specifiers as it should.
    This is complex to implement for virtual specifiers... I'll document it as a current limitation.
    In the future, if I move to support only C++11 then I can use native virtual specifiers.
    If I still want to claim C++03 support, I should probably fix this at some point...

     
  • Lorenzo Caminiti

    In addition, virtual specifiers use a great deal of introspection code which might be one of the reason for slow compile time.
    Do not fix this before compile time performance analysis because if introspection indeed slows down compilation then I'll keep it only for subcontracting (when it's really necessary) and I'll support virtual specifiers only on C++11 using native support so to get faster compilation times.

     
  • Lorenzo Caminiti

    • priority changed from major to minor
    • status changed from new to accepted
     
  • Lorenzo Caminiti

    • milestone changed from Future to 1.0.0
     

Log in to post a comment.