std::filesystem::path::append oddity
NightStrike
nightstrike@gmail.com
Sun Jun 17 22:01:00 GMT 2018
I'm probably missing something abundantly obvious here, but shouldn't these
two methods of appending be the same according to
https://en.cppreference.com/w/cpp/filesystem/path/append variants 2 and 3?
#include <filesystem>
#include <string>
namespace fs = std::filesystem;
void f() {
fs::path p;
p /= fs::path("s"); // works
p.append(fs::path("s")); // doesn't
}
It appears like clang doesn't support it, either. The downside here is
that it prevents being able to do the following:
ifstream if { p.append(...).c_str() };
More information about the Gcc-help
mailing list