On Wed, Jan 02, 2008 at 06:24:00PM +0200, Yossi Kreinin wrote: > Macro expansion or template instantiation or code generation or whatever > results in all kinds of corner cases. It's nice when int a[]={1,2,}; > compiles although a human probably wouldn't insert that last comma, for > example. And then the error message in the reinterpret_cast case is utterly > ridicuous.
Good point. I've worked on a system that generates C code. It intentionally does things like that which would be fairly hateful if a human programmer did them, but make sense for machine-generated code. It makes the generator simpler if it doesn't have to worry about dealing with the weird edge cases. Walt
signature.asc
Description: Digital signature