28std::unique_ptr<T> open_fstream(
const std::string &path, std::ios_base::openmode mode)
63 auto iocfg = std::make_unique<UI>();
65 auto in = open_fstream<std::ifstream>(cmdargs.
get_or(0,
"-"), std::ios::in | std::ios::binary);
66 iocfg->in(std::move(in));
68 auto out = open_fstream<std::ofstream>(cmdargs.
get_or(1,
"-"), std::ios::out | std::ios::binary);
69 iocfg->out(std::move(out));