Avoid Typeless Interfaces
std::string find_file(const std::string &base, const std::string &pattern);
std::filesystem::path find_file(const std::filesystem::path &base, const std::regex &pattern);
The above is better but still suffers from having implicit conversions from
std::filesystem::path and back.
Consider using a typesafe library like
Note that stronger typing can also allow for more compiler optimizations.