|
Boost Users : |
Subject: [Boost-users] phoenix ostream<< result type wrong
From: Hite, Christopher (Christopher.Hite_at_[hidden])
Date: 2011-11-09 14:47:59
I'm using Boost version 1.43, perhaps this has been fixed.
std::stringstream ss;
(boost::phoenix::arg_names::arg1<<1<<2<<3)(ss);
BOOST_CHECK_EQUAL(ss.str(),"123"); // check ss.str() == "123" failed [1 != 123]
I think what's going on is that the shift operator is returning the int and not the stream. This shouldn't compile, but does:
int o=(boost::phoenix::arg_names::arg1<<1<<2<<3)(ss);
My use case is a log library which does the actual streaming in non-critical space.
Chris
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net