Bug in filesystem library? (wpath, wdirectory_iterator)

I noticed something which looks pretty much like a bug in the filesystem library. Both version 1.34.1 and CVS are affected under Linux. I do not know about other versions/platforms. If I compile and run the following code ----------------------------------- #include <boost/filesystem.hpp> #include <iostream> int main(int argc, char *argv[]) { boost::filesystem::wpath p(L"/"); boost::filesystem::wdirectory_iterator i(p); return 0; } ----------------------------------- then I get an exception: ----------------------------------- terminate called after throwing an instance of 'boost::filesystem::basic_filesystem_error<boost::filesystem::basic_path<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, boost::filesystem::wpath_traits> >' what(): boost::filesystem::wpath::to_external conversion error: Invalid argument Aborted ----------------------------------- However, the following alternate version (which uses char instead of wchar_t) works: ----------------------------------- #include <boost/filesystem.hpp> #include <iostream> int main(int argc, char *argv[]) { boost::filesystem::path p("/"); boost::filesystem::directory_iterator i(p); return 0; } ----------------------------------- Has anyone ever found a way to cope with that or filed a bug? Thanks -- Olivier
participants (1)
-
Olivier Delande