Index: boost/spirit/home/phoenix/operator/io.hpp =================================================================== --- boost/spirit/home/phoenix/operator/io.hpp (revision 49602) +++ boost/spirit/home/phoenix/operator/io.hpp (working copy) @@ -30,6 +30,21 @@ return compose(phoenix::ref(a0), a1); } + // resolve ambiguities with fusion. + template + inline typename detail::enable_if_ostream::type + operator<<(std::ostream& a0, actor const& a1) + { + return compose(phoenix::ref(a0), a1); + } + + template + inline typename detail::enable_if_istream::type + operator>>(std::istream& a0, actor const& a1) + { + return compose(phoenix::ref(a0), a1); + } + /////////////////////////////////////////////////////////////////////////////// // // overloads for I/O manipulators. Index: libs/spirit/phoenix/test/operator/io_tests.cpp =================================================================== --- libs/spirit/phoenix/test/operator/io_tests.cpp (revision 49602) +++ libs/spirit/phoenix/test/operator/io_tests.cpp (working copy) @@ -15,6 +15,8 @@ #include #include +#include + using namespace boost::phoenix; using namespace boost::phoenix::arg_names; using namespace std; @@ -37,6 +39,7 @@ (cout << val(hello) << world << ", you da man!\n")(); for_each(v.begin(), v.end(), cout << arg1 << ','); + (cout << arg1 + 1)(i100); (cout << arg1 << "this is it, shukz:" << hex << arg2 << endl << endl)(msg, i100);