Hi,
the documentation of the Boost.Fusion library (1.63.0) at
http://www.boost.org/doc/libs/1_63_0/libs/fusion/doc/html/fusion/sequence/op...
affirms that operator<< is defined in the boost::fusion namespace with
the following synopsis:
template
OStream&
operator<<(OStream& os, Sequence& seq);
where the template parameter OStream is defined as "An output stream".
Accordingly, I thought that the following would work:
using boost::fusion::operator<<;
fusion::vector v =
fusion::make_vector(42, 3.1415, "foobar");
std::wcout << "v = " << v << std::endl;
However, the compiler (MSVC 9) complains that it has:
"found no defined operator << taking a right-hand argument of type
boost::fusion::vector with T0 = int, T1 = double, T2 = char
*"
If I replace std::wcout with its narrow-char sibling std::cout,
everything works as expected; i.e. the code compiles and when run
prints (42,3.1415, foobar).
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)
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?
If needed, I could volunteer for writing a patch.
Thank for your attention
--
Leo Cacciari
Aliae nationes servitutem pati possunt. Populi Romani est propria libertas.