Skip to content

Instantly share code, notes, and snippets.

@rkitover
Last active July 25, 2022 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rkitover/07f6d2ffa015befa40c6a110f386a804 to your computer and use it in GitHub Desktop.
Save rkitover/07f6d2ffa015befa40c6a110f386a804 to your computer and use it in GitHub Desktop.
construct native paths
// 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