我有这段代码
auto path = std::filesystem::path("/root/home/../opt/.");
我曾尝试过, std::filesystem::absolute()但后来意识到这是因为我想要的结果之外的其他东西
std::filesystem::absolute()
我的问题是如何将该相对路径转换为绝对路径,以便结果是"/root/opt/".
"/root/opt/"
我在 Debian g++-9 上使用 c++17
c++ filepath c++-standard-library c++17 std-filesystem
c++ ×1
c++-standard-library ×1
c++17 ×1
filepath ×1
std-filesystem ×1