3 ms·
one of my favourite old school tricks for achieving such breakery is: #define const_cast CONST_CAST_IS_FORBIDDEN #define dynamic_cast DYNAMIC_CAST_IS_NEVER_NEC
by jheriko 13y ago
one of my favourite old school tricks for achieving such breakery is:
#define const_cast CONST_CAST_IS_FORBIDDEN
#define dynamic_cast DYNAMIC_CAST_IS_NEVER_NECESSARY
etc...
its dirty, but it gets the job done
- panzi 13y agoThen I'll just use a C-style cast. :P
- jheriko 13y agodon't worry, i can't do this across /all/ code anymore - some lazy ms monkeys were unkind enough to dump dynamic casts in library headers sometime around 2008. C-style cast at least doesn't make you pay through the nose in debug time or performance overheads - even if it is easily confusing :)