boost中的字符串类型是什么

时间:2013-12-19 12:06:50

标签: c++ string boost

我是新手来提升。我在代码中使用wstring,但我认为这样做并不好,因为它在Linux上不起作用。

从boost中查看一些函数,我注意到它的字符串可以在我可以使用wtring和string的地方使用。

我使用boost字符串代替std字符串似乎更合乎逻辑,因为似乎boost字符串比std字符串更便携。

那么如何在boost中定义字符串以及如何在我的代码中将其用作字符串类型。

这样做是否是个好主意(使用boost字符串而不是std字符串)?

我有这样的代码似乎有效:

    inline static bool IsDirectory(const wstring &path)
    {
        return is_directory(path);
    }

    inline static bool IsDirectory(const string &path)
    {
        return is_directory(path);
    }

0 个答案:

没有答案
相关问题