Boost logo

Boost-Build :

Subject: [Boost-build] phoenix ostream<< result type wrong
From: Hite, Christopher (Christopher.Hite_at_[hidden])
Date: 2011-11-07 03:33:45


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-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk