Op 3 jul. 2017 11:27 p.m. schreef "Riot" <[email protected]>:
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
On 3 July 2017 at 21:19, niXman <[email protected]> wrote:
> Riot 2017-07-03 20:04:
>
>> I 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
> ___________________________________________________
> Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows:
> 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
> [email protected]
> 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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public