GCC Bugzilla – Attachment 50317 Details for
Bug 99430
std::filesystem::path: UNC device paths with \\?\… not supported properly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
test case highlighting the issue
std_filesystem_vs_boost_filesystem.cpp (text/x-csrc), 1.78 KB, created by
Moritz Bunkus
on 2021-03-06 16:11:51 UTC
(
hide
)
Description:
test case highlighting the issue
Filename:
MIME Type:
Creator:
Moritz Bunkus
Created:
2021-03-06 16:11:51 UTC
Size:
1.78 KB
patch
obsolete
>#include <filesystem> >#include <iostream> >#include <boost/filesystem.hpp> > >void show(std::filesystem::path const &p) { > std::cout << "std::filesystem::path for " << p.string() << "\n" > << " is_aboslute " << p.is_absolute() << "\n" > << " has_root_path " << p.has_root_path() << "\n" > << " has_root_name " << p.has_root_name() << "\n" > << " exists " << std::filesystem::exists(p) << "\n" > << " is_directory " << std::filesystem::is_directory(p) << "\n"; >} > >void show(boost::filesystem::path const &p) { > std::cout << "boost::filesystem::path for " << p.string() << "\n" > << " is_aboslute " << p.is_absolute() << "\n" > << " has_root_path " << p.has_root_path() << "\n" > << " has_root_name " << p.has_root_name() << "\n" > << " exists " << boost::filesystem::exists(p) << "\n" > << " is_directory " << boost::filesystem::is_directory(p) << "\n"; >} > >int >main() { > show(std::filesystem::path{R"(\\?\C:\WINDOWS)"}); > show(boost::filesystem::path{R"(\\?\C:\WINDOWS)"}); > > show(std::filesystem::path{R"(\\?\UNC\localhost\c$\WINDOWS)"}); > show(boost::filesystem::path{R"(\\?\UNC\localhost\c$\WINDOWS)"}); > > show(std::filesystem::path{R"(\\.\C:\WINDOWS)"}); > show(boost::filesystem::path{R"(\\.\C:\WINDOWS)"}); > > show(std::filesystem::path{R"(\\.\UNC\localhost\c$\WINDOWS)"}); > show(boost::filesystem::path{R"(\\.\UNC\localhost\c$\WINDOWS)"}); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 99430
: 50317