
11 Jul
2008
11 Jul
'08
12:54 p.m.
Is it possible to invoke user defined streaming operators within boost lambda functions? In this style #include <iostream> #include <map> #include "boost/lambda/lambda.hpp" using namespace std; ostream & operator << ( ostream & ostrm, pair<string, string> const & input ); ostream & operator << ( ostream & ostrm, map<string, string> & inputs ) { using namespace boost :: lambda; for_each ( inputs.begin( ), inputs.end( ), ostrm << _1 << '\n' ); return ostrm; } Is this basically undoable, or am I doing it wrong? Also, does the online Comeau compiler understand the boost include directives? Thanks, Rob.