Boost logo

Boost Users :

Subject: [Boost-users] [phoenix] [math] operator<< confusion
From: Christian Henning (chhenning_at_[hidden])
Date: 2008-11-05 14:21:56

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
&,const boost::phoenix::actor<boost::phoenix::composite<EvalPolicy,EvalTuple>>
&)' [found using argument-dependent lookup]


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]

I'm using Visual Studio 2005.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at