no suitable user-defined conversion from utility::string_t to std::string

前端 未结 3 1936
渐次进展
渐次进展 2021-01-05 15:05

I am using the casablanca C++ Rest library to make HTTP requests.

The problem is that this gives a utility::string_t string as output and I can\'t quite find any way

3条回答
  •  滥情空心
    2021-01-05 15:48

    Depending on what platform you are compiling for, the utility::string_t type will be typedef'd to either std::wstring (on Windows) or std::string (on Linux/OSX).

    To get a classic utf-8 std::string regardless of platform, take a look at utility::conversions::to_utf8string.

    reference documentation

提交回复
热议问题