>Just for the sake of thoroughness, there is another
>problem with using macros instead of functions. Even
I agree with Richard on this.
As described in Effective C++ by Scott Meyers (an awesome book BTW),
macros are evil. It's always better to use the compiler instead of the
preprocessor if given equal opportunity to use both. Inline and
templatized functions make the macro use in the case of Abs less than
optimal. If for nothing else, it makes debugging more difficult in the
case of the macro.
Of course, this also depends on the sophistication of the compiler that
you are using.
That's adds up to about $.02.
Cheers,
Mike