Boost logo

Boost :

From: Rani Sharoni (rani_sharoni_at_[hidden])
Date: 2003-12-09 14:50:53


Daniel Frey wrote:
> On Tue, 09 Dec 2003 19:41:13 +0100, Rani Sharoni wrote:
>
>> Daniel Frey wrote:
>>> Rani Sharoni wrote:
>>>> I accidentally encounter some bug in EDG (latest) that is
>>>> exploitable
>>>> for implementing is_incomplete. I personally despise this ODR rebel
>>>> but I suspect that some really like it.
>>>
>>> I was thinking about something similar while fixing checked_delete,
>>> but refrained from it as violating the ODR seemed to dangerous to
>>> me. Check the "feature" of some compilers to set the sizeof(T) to 0
>>> for
>>> incomplete types T. Maybe it works on more compilers than the bug
>>> you found currently, since some vendors think it's a feature :o)
>>
>> I suspect that except for EDG no compiler is compliant enough to
>> allow
>> such abuse :)
>
> Hm, either I midread what you wrote above or you misread what I wrote
> above :) Let's clarify my point with some code:

I understood your intention pretty well and I was aware for that
"technique". I meant that my tricky abuse requires highly compliant compiler
like EDG. I hope that it's also amusing.
I noticed my compilers (EDG, GCC, VC and BCC) rejected your code but I trust
you that other compilers digest it with no problems.

Rani

BTW - way do you bother using cout when the compiler can tell you the
answer?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk