
10 Feb
2012
10 Feb
'12
1:35 p.m.
On Thu, Feb 9, 2012 at 11:05 PM, John M. Dlugosz
On 2/9/2012 1:49 PM, Nat Linden wrote:
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
Simply that hidden_stream_object really isn't visible in the calling context. It's local to the context of ourmacro_f().