Const/Shared/Immutable anomalies in D that should be fixed

Steven Schveighoffer schveiguy at yahoo.com
Thu May 3 06:43:36 PDT 2012


On Thu, 03 May 2012 03:45:51 -0400, Chris Cain <clcain at uncg.edu> wrote:

> On Thursday, 3 May 2012 at 06:00:58 UTC, Mehrdad wrote:
>> I believe all of these static assertions (and some variants thereof)  
>> should pass, due to the semantics of const, immutable, and shared.
>>
>> ...
>>
>> Do people agree?
>
>      //static assert(is(Const == shared(Const))); // Doesn't pass

Right, there is a common misconception that const can be implicitly cast  
 from shared, but it cannot.  It's orthogonal.

-Steve


More information about the Digitalmars-d mailing list