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.
Returns a std::string
in the native pathname format.
Returns a std::string
in the generic pathname format.
Well, that's up to you, and depends on your needs! The following quotation, again from the documentation, may help…
[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: