const(type) vs. const type
    Trass3r 
    un at known.com
       
    Tue Jul 20 16:23:02 PDT 2010
    
    
  
> I'm playing with QtD, and I tried to override a QWidget's sizeHint()
> function, which is declared as const QSize sizeHint(). I tried to
> override it by declaring my function as override const(QSize) sizeHint
> () . I got a compiler error that it was "not covariant" with const QSize,
http://digitalmars.com/d/2.0/const3.html
In that case it is a const member function which means it is not allowed  
to change any part of the object through the member function's this  
reference.
    
    
More information about the Digitalmars-d-learn
mailing list