For example, a.h
static inline void asdf(int a) {}
b.h
static inline void asdf(int a) {}
is this ok? will there be any conflicts?
It will only be ok if no single source ever include both headers. If all .c files either include only a.h or only b.h or none, then all will be fine.
If both header were included in same source, you would get an error for redefinition of asdf.
An acceptable example would be if none of the .c files include directly a.h or b.h but only a c.h file containing:
#ifdef A_TYPE
#include a.h
#else
#include b.h
#endif
because the choice of the implementation would rely on a compile time constant
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments