10 Feb
2012
10 Feb
'12
4:05 a.m.
On 2/9/2012 1:49 PM, Nat Linden wrote:
OURMACRO("some streaming expr " << value << ...);
that would stream arbitrary objects as in:
hidden_ostream_object << "some streaming expr " << value << ...;
His solution is like this:
template <typename FUNCTOR> void ourmacro_f(const FUNCTOR& f) { f(hidden_ostream_object); }
#define OURMACRO(EXPRESSION) (ourmacro_f(boost::lambda::_1 << EXPRESSION))\
How is that different from just using: #define OURMACRO(EXPRESSION) hidden_stream_object << EXPRESSION