Op 3 jul. 2017 11:27 p.m. schreef "Riot" <***@gmail.com>:
Sure, but they're embarassingly trivial, as my email suggests.
// build with g++ test_temp_path.cpp -lstdc++fs
#include <iostream>
#include <experimental/filesystem>
auto main()->int {
std::cout << "Temp dir: \"" <<
std::experimental::filesystem::temp_directory_path() << "\"" << std::endl;
return EXIT_SUCCESS;
}
Temp dir: "terminate called after throwing an instance of
'std::experimental::filesystem::v1::__cxx11::filesystem_error'
what(): filesystem error: temp_directory_path: Unknown error
Similarly:
// build with g++ test_remove.cpp -lstdc++fs
#include <experimental/filesystem>
auto main()->int {
std::experimental::filesystem::remove("my_file.txt");
return EXIT_SUCCESS;
}
terminate called after throwing an instance of
'std::experimental::filesystem::v
1::__cxx11::filesystem_error'
what(): filesystem error: cannot remove: Unknown error [my_file.txt]
Regards,
Riot
What GCC version is this? Where does the filesystem code come from (patch,
upstream, ...)? It might be incomplete and this error may just be the
library telling you it's not implemented.
Ruben
Post by niXmanPost by RiotI came across two fairly major inconsistencies with
std::experimental::filesystem support today.
One is that std::experimental::filesystem::temp_directory_path returns
empty every time, with "unknown error."
The other is that std::experimental::filesystem::remove silently fails to
delete anything.
Hi,
Can you provide testcases, please?
--
Regards, niXman
___________________________________________________
https://sf.net/p/mingw-w64/
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public