How to break const

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Jun 18 07:51:30 PDT 2012


On 6/18/12 9:45 AM, deadalnix wrote:
> Le 18/06/2012 16:43, Andrei Alexandrescu a écrit :
>> On 6/18/12 7:43 AM, deadalnix wrote:
>>> Le 18/06/2012 07:36, Mehrdad a écrit :
>>>> Is it just me, or did I subvert the type system here?
>>>>
>>>
>>> delegate fail to ensure transitivity of type qualifier. This is no news.
>>> This is however a big error.
>>>
>>> I proposed a fix to that by changing the semantic of the type qualifier
>>> depending on its position in the declaration, but didn't received much
>>> feedback at the time.
>>
>> I don't think that's the correct explanation.
>>
>> Andrei
>>
>
> I fail to understand what you mean here. This post ins't supposed to
> explain anything.

Mehrdad posted a code sample and you replied to it with what I could 
only assume was an explanation of the code's behavior. I hope you'd 
agree it was a reasonable assumption, whether or not it was correct.

The problem at work here is that "this" is typed incorrectly during the 
construction of a qualified object. It should go progressively from a
"raw" to a "cooked" state, and cannot be passed to any function while raw.

> I've however made other posts to explain why
> transitivity is broken when it comes to delegate.

I looked at your posts through June and couldn't find such, so a couple 
of links would be great. Of course, bug reports would be even better!


Andrei


More information about the Digitalmars-d mailing list