什么是BOOST_FILESYSTEM_VERSION 3模拟BOOST_FILESYSTEM_VERSION 2 path.native_file_string()?

时间:2011-06-18 19:24:33

标签: c++ boost path boost-filesystem

所以我尝试移植我的旧项目(从1.44升级到1.61)我发现path.native_file_string()中没有boost::filesystem v3...

那么path.native_file_string()boost::filesystem v3的模拟是什么? (我不想再使用v2了,但我需要像native_file_string这样的功能)

2 个答案:

答案 0 :(得分:4)

如果您正在谈论path::external_file_string(当前Boost.FileSystem v2中没有native_file_string),则等效值为path::native。这将返回主机操作系统格式的字符串,使用该系统的本机字符串类型(Windows的std :: wstring,Linux的std :: string等)。

答案 1 :(得分:1)

看这里: http://www.boost.org/doc/libs/1_45_0/libs/filesystem/v3/doc/deprecated.html

对应的新名称
  

native_file_string()

  

的字符串()