boost中的path :: string()和path :: generic_string()有什么区别? [英] What is the difference between path::string() and path::generic_string() in boost?

查看:474
本文介绍了boost中的path :: string()和path :: generic_string()有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

boost::path::string()boost::path::generic_string()有什么区别,什么时候应该使用它们?

What is the difference between boost::path::string() and boost::path::generic_string(), and when should I use each of them?

推荐答案

This is clearly stated in the documentation; you need only read the documentation to gain knowledge and understanding. Please get into the habit of doing that, starting from now.

这取决于您,取决于您的需求!再次引用文档中的以下引用可能会有帮助&

Well, that's up to you, and depends on your needs! The following quotation, again from the documentation, may help…

[注:对于ISO/IEC 9945,不会发生转换,因为本机格式和通用格式相同.对于Windows,反斜线将转换为斜线--尾注]

[Note: For ISO/IEC 9945, no conversion occurs, since the native format and generic format are the same. For Windows, backslashes are converted to slashes --end note]

在日常使用中,您可以有效地说:

In day-to-day use, you can effectively say:

  • 在Windows上,本机格式包含反斜杠,而通用格式包含反斜杠;
  • 在Linux上,两种格式都有斜杠.

这篇关于boost中的path :: string()和path :: generic_string()有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆