boost::filesystem::path
uses &
to escape quotes in path string, see demo:
std::cout << boost::filesystem::path("/R&D/Project \"boost\"") << std::endl;
Prints "/R&&D/Project &"boost&""
. However, for std::filesystem::path
I see this:
Performs stream input or output on the path p. std::quoted is used so that spaces are not truncation when later read by stream input operator.
Here is from std::quoted
:
escape - the character to use as the escape character, defaults to \
From this I can tell that std::filesystem::path
will use \
instead of &
.
Is this correct? If yes, why the committee decided to change this behavior?
Bonus question: are there any implementations of std::filesystem::path
available? Seems like none of latest GCC and clang provide <filesystem>
header.