std::filesystem::path::append oddity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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() };



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux