C didn't have inline functions, so inlined code was injected using macros.
The equivalent in C++ would be to use an inline function instead. If there's an error in it, you'll get proper error messages back, plus you get proper type checking. However, the function may not be inlined, the inline keyword is more a compiler hint than a command.