Boost logo

Boost Users :

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


On 04/05/2017 09:10 AM, Leo Cacciari via Boost-users wrote:
> the documentation of the Boost.Fusion library (1.63.0) at
> affirms that operator<< is defined in the boost::fusion namespace with
> the following synopsis:
> template <typename OStream, typename Sequence>
> OStream&
> operator<<(OStream& os, Sequence& seq);
> where the template parameter OStream is defined as "An output stream".
> <snip>
> Looking into the source (file boost/fusion/sequence/io/out.hpp) it
> seems that the operator<< is only defined for left-hand argument of
> type std::ostream.
> Thus the questions:
> 1. Is this a bug and should I post a ticket about it? (I looked in
> the bugs database but I couldn't find it)

  It's definitely a bug. Whether the bug is in
the documentation or in the source, I can't say.
Personally, I think both are wrong, and the
correct signature is
template<class CharT, class Traits, class Sequence>
std::basic_ostream<CharT, Traits>& operator<<(
  std::basic_ostream<CharT, Traits>&, Sequence const&);

> 2. If it's a bug, are there any plan to patch it soon?
> 3. If not, does exist any reason why it shouldn't be patched nevertheless?

In Christ,
Steven Watanabe

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