Smart pointers that rely on the type system