News for hackers. Stuff that matters.
Re:C Macro Tips and Tricks by bmastenbrook on Saturday January 01, 2011 @10:47AM (#2057740)
As I said, 0x lambdas can do that...

... but you probably shouldn't: don't use a macro where a function will suffice, and if you need to use a macro, write a macro that syntactically wraps around a function if possible. C++, especially 0x, provides a lot of metaprogramming functionality you can use to avoid writing macros in many cases. Using this functionality will give the compiler more information about your program for analysis purposes, which means the compiler can help ensure correctness and better efficiency.

There are no comments on this comment yet.