+1

Completely agree with all points. I generally prefer inline function and const 
variables over defines if I can help it.

On 24/04/17 10:14am, Laslo Hunhold wrote:
> On Mon, 24 Apr 2017 10:01:31 +0200
> Anselm R Garbe <[email protected]> wrote:
> 
> Hey Anselm,
> 
> > I'd prefer a define instead of a one-line function.
> 
> a macro does not bring any advantages to the table, but some
> disadvantages. It makes it harder to analyze the binaries when debug
> symbols are compiled in, because everything happens in the CPP. Also,
> the compiler will be smart enough to inline a one-line-function, so
> there's no loss. I personally avoid function-macros as much as I can
> and only use it where it's not possible with a normal function.
> 
> But that's my opinion. What do the others think?
> 
> With best regards
> 
> Laslo
> 
> -- 
> Laslo Hunhold <[email protected]>
> 

Reply via email to