Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法让 boost.format 使用和返回宽(Unicode)字符串?
我希望能够执行以下操作:
wcout << boost::format(L"...") % ...
和
wstring s = boost::str(boost::format(L"...") % ...)
这可能吗?
format_fwd.hpp包含此类型定义:
format_fwd.hpp
typedef basic_format<wchar_t > wformat;
我想这会让你开始。这在这里有效:
std::wcout << boost::wformat(L"...") % ...
还有boost::str作品使用wformat.
boost::str
wformat