this() not executing code on structs

Bartosz Milewski bartosz-nospam at relisoft.com
Wed Oct 21 13:43:11 PDT 2009


This means that no non-trivial invariant may be defined for a struct. In most cases it doesn't matter, but it might be a problem with the smart pointer family. 

For instance, refcounted may not assume that the shared refcount pointer has been allocated. Without this invariant all refcounted operations must have additional code that tests for null and does the right thing (which is not always obvious).



More information about the Digitalmars-d mailing list