how to use opdot
    Christopher Wright 
    dhasenan at gmail.com
       
    Thu Nov 20 20:22:54 PST 2008
    
    
  
Steven Schveighoffer wrote:
> "Christopher Wright" wrote
>> Steven Schveighoffer wrote:
>>> Not exactly ;)  The wrapped type is not equivalent to inheritance.
>> No, exactly:
>>
>> class Wrapper(T) : T
>> {
>> T opDot() {}
>> }
> 
> class Wrapper(T) : T
> {
> }
> 
> works just as good ;)
> 
> -Steve 
True, but with opDot, you can swap out the real value. I can think of 
cases in which this would be useful -- a sort of "I'll fill in this 
value later" thing.
    
    
More information about the Digitalmars-d-learn
mailing list