virtual specifiers do not work with deep inheritance
Contract Programming Library for C++
Status: Pre-Alpha
Brought to you by:
lcaminiti
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?
};
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...
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.