implicit conversions to/from shared

ag0aep6g via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 10 22:49:22 PDT 2016


On 07/11/2016 07:26 AM, ag0aep6g wrote:
> On 07/11/2016 01:52 AM, Alex Parrill wrote:
[...]
>> I don't think there is an issue with converting unshared reference types
>> to shared (ex. ref T -> ref shared(T) or T* -> shared(T)*); worst you
>> get is some extra synchronization.
>
> shared(T)* is not shared itself, so that's fine, yeah.

The conversion T* -> shared(T)* isn't ok, of course. And it's correctly 
disallowed already. But it's for a different reason than this thread is 
about.


More information about the Digitalmars-d mailing list