D 2.x invariant question

Charles D Hixson charleshixsn at earthlink.net
Wed Oct 31 13:19:21 PDT 2007


Would the following function:
invariant Body	opIndex	(Key k)
{  if (k in _cache)
    { ....
       return  _cache[k].bdy;
    }
    return  null;
}

return values that were invariant, or would that type have to 
be declared at the declaration of the type "Body"?


More information about the Digitalmars-d-learn mailing list