
26 Apr
2005
26 Apr
'05
5:13 a.m.
Felipe Magno de Almeida wrote:
couldn't a macro disable code like: stream << a << b << c making operator << a "do nothing" function? I dont think it will have any overhead in the release code... maybe just for strings "of this type" that normally isnt optimized away...
Could it completely 'remove' the code? Not that I know of. Although, there's no reason a decent compiler wouldn't detect something like this (which the macro could be changed into with a 'don't compile' compilation option) and not emit code for it. if (1) ; else someStream() << a << b << c; Patrick Bennett