Should I use a private static member function, or free function in an unnamed namespace?

If the function is only used in one source file, it makes perfect sense to define it there. If nobody else is using it, it doesn’t belong in the header.

As you say, it reduces dependencies and can potentially save some recompiles.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)