[Qt-interest] QWizardPage::wizard() overprotected?

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Fri Dec 12 12:04:15 CET 2008


Thiago Macieira wrote on Thursday, December 11, 2008 1:12 PM:
> On Thursday 11 December 2008 12:09:06 Oliver.Knoll at comit.ch wrote:
>> // muahahahahaaa (*evil laughter*)
>> #define private public
>> #define protected public
> ...
> Just point out: this trick doesn't work with Microsoft Visual Studio
> compilers, since the protection is encoded in the function's mangled
> name.

I can confirm that this still works with Visual Studio 2005 (Express) without any warning (maybe there's this switch somewhere with which you could stop such nonsense). Maybe Microsoft has changed that in VS 2008. I didn't know that the "C++ standard" woudl actually forbid this, because it would never come to my mind to do such things.

Anyway, I got this dirty trick from some C++ guru who is even member of some Swiss C++ user/interest group or whatever, when we had a discussion on how you could fool the language constructs (I am not implying here that we Swiss software engineers like to play dirty tricks, hey, I am really not! ;)

Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22




More information about the Qt-interest-old mailing list