cpp-subprocess
cpp-subprocess copied to clipboard
static inline functions in a header only library
You have a lot of static inline functions, such as
static inline std::vector<std::string>
split(const std::string& str, const std::string& delims=" \t")
The problem is, with static functions, the compiler will create a separate internal copy of the function in every translation unit that has included subprocess.hpp. In large projects this can grow to huge numbers. Those functions should be just inline, without static. This way they will be visible to the linker, so it will remove the copies.