Yeah, but then you have to compile the function in every single cpp file and your linking time increases and you're at risk of violating ODR and you have to give people the full definition of your function if you're making a library rather than just the declaration and a .a/.obj/.so.