Skip to content

Instantly share code, notes, and snippets.

View asryansergey's full-sized avatar

Sergey Asryan asryansergey

View GitHub Profile
@asryansergey
asryansergey / join.cc
Last active February 13, 2022 15:38
Easy way to construct filesystem paths with parameter pack.
#include <filesystem>
#include <string>
namespace fs = std::filesystem;
template <typename... Args>
void join(fs::path& p, Args&&... args) {
((p /= std::forward<Args>(args)), ...);
}