Boost logo

Boost Users :

Subject: Re: [Boost-users] [Fusion] wide-char output
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2017-04-05 17:22:12


On 04/05/2017 10:43 AM, Mark Stallard via Boost-users wrote:
> Leo Cacciari <leo.cacciari_at_[hidden]> wrote:
>> Accordingly, I thought that the following would work:
>> using boost::fusion::operator<<;
>> fusion::vector<int, double, const char *> v = fusion::make_vector(42, 3.1415, "foobar");
>> std::wcout << "v = " << v << std::endl;
> Forgive me if I'm missing something obvious: Could the problem be that your passing char-based strings to an output stream expecting wchar_t-based text?
> Couldn't you fix this by writing to std:cout instead of std::wcout?

basic_ostream has an overload for const char * in
addition to const CharT*.

In Christ,
Steven Watanabe

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at