[phoenix] [math] operator<< confusion

Hi there, the following code creates an compiler error since the operator<< is ambiguous. #include <boost/math/distributions/gamma.hpp> #include <boost/spirit/include/phoenix_bind.hpp> #include <boost/spirit/include/phoenix_operator.hpp> #include <iostream> #include <vector> struct point { double _prob; double _x; }; int _tmain(int argc, _TCHAR* argv[]) { using namespace boost::phoenix; std::cout << bind( &point::_prob, point() ); return 0; } The error is: 1>.\test.cpp(25) : error C2593: 'operator <<' is ambiguous 1> c:\boost\boost/spirit/home/phoenix/operator/io.hpp(21): could be 'boost::phoenix::actor<Eval> boost::phoenix::operator <<<std::ostream,boost::phoenix::composite<EvalPolicy,EvalTuple>>(T0 &,const boost::phoenix::actor<boost::phoenix::composite<EvalPolicy,EvalTuple>> &)' [found using argument-dependent lookup] [snip] 1> c:\boost\boost/fusion/sequence/io/out.hpp(36): or 'std::basic_ostream<_Elem,_Traits> &boost::fusion::operators::operator <<<boost::phoenix::actor<Eval>>(std::ostream &,const Sequence &)' [found using argument-dependent lookup] [snip] I'm using Visual Studio 2005. Regards, Christian

Steven Watanabe wrote:
AMDG
Christian Henning wrote:
Hi there, the following code creates an compiler error since the operator<< is ambiguous.
<snip>
Patch against the trunk attached. Okay to commit?
If I haven't said so yet, please do :-P Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net
participants (3)
-
Christian Henning
-
Joel de Guzman
-
Steven Watanabe