-
-
Save rkitover/07f6d2ffa015befa40c6a110f386a804 to your computer and use it in GitHub Desktop.
construct native paths
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Helper variadic template function to construct native paths. | |
// Used like: PATH("usr", "local", "bin"); | |
template<typename... T> | |
std::string | |
PATH(const T&... args) | |
{ | |
return (std::filesystem::path{} / ... / args).string(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment