Using a filesystem::path, how do you open a file in a cross-platform way?

前端 未结 1 1548
清歌不尽
清歌不尽 2020-12-29 21:44

Let\'s say you have used the new std::filesystem (or std::experimental::filesystem) code to hunt down a file. You have a path variable

相关标签:
1条回答
  • 2020-12-29 22:25

    Bo Persson pointed out that this is the subject of a standard library defect report. This defect has been resolved, and C++17 will ship, requiring implementations where path::value_type is not char to have their file stream types take const filesystem path::value_type*s in addition to the usual const char* versions.

    0 讨论(0)
提交回复
热议问题