4 ms·
Has GCC got the necessary pragma foo to implement this?
by hsmyers 13y ago
Has GCC got the necessary pragma foo to implement this?
- CJefferson 13y agoProbably not, but could put comments in the header?
- jheriko 13y agoone 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 :)
- yetanotherphd 13y agoif it does, it should be called antidote.