I have some small utility functions (< 20 lines of code per function) that I am currently putting in a utils.h file with the keyword inline in front of them so I don't run into multiple definition linking errors. This is what I have always done for small functions.
I am wondering what the advantages and disadvantages are to:
-
Using my method
-
Putting the function declarations in
utils.hand definitions inutils.cpp
Aucun commentaire:
Enregistrer un commentaire