Safe Regions with Deterministic Destruction

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Tue Oct 27 07:45:21 UTC 2020


On Tuesday, 27 October 2020 at 07:07:49 UTC, Ola Fosheim Grøstad 
wrote:
> On Tuesday, 27 October 2020 at 06:16:11 UTC, ag0aep6g wrote:
>> `scope` isn't transitive. It just applies to the pointers in 
>> the variable (i.e. `t.root`).
>
> But technically the t.root pointer address is a value, so 
> apparently scope does not apply only to t, but also to the 
> member root?

Ok, I guess this is to allow scope limiting of custom smart 
pointers...

Maybe it would be better to have some way of telling the compiler 
that something is a smart pointer.


More information about the Digitalmars-d mailing list