其他分享
首页 > 其他分享> > c – 什么是BOOST_FILESYSTEM_VERSION 3模拟BOOST_FILESYSTEM_VERSION 2 path.native_file_string()?

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

作者:互联网

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

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

解决方法:

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

标签:boost-filesystem,c,boost,path
来源: https://codeday.me/bug/20190903/1796456.html