|
Boost-Build : |
From: hugo_duncan (hugo_duncan_at_[hidden])
Date: 2002-02-15 13:58:51
I think that I am have found a problem with bind, but maybe I am just misusing it.
The following program compiles fine on borland 5.5.1 and gcc 2.95.3-5 but fails on MSVC 7
#include "boost/bind.hpp"
#include "boost/shared_ptr.hpp"
#include <vector>
#include <algorithm>
class x
{
public:
int mf() const
{
return 1;
}
};
typedef boost::shared_ptr<x> ptr;
int main(int, char**)
{
std::vector<ptr> y;
std::find_if(y.begin(), y.end(),
boost::bind(std::equal_to<int>(),1,boost::bind(&x::mf,_1)));
return 1;
}
The error message begins
test.cpp(22) : error C2780: 'boost::_bi::bind_t<R,boost::_mfi::cmf8<R,T,B1,B2,B3,B4,B5,B6,B7,B8>,boost::_bi::list_av_9<R,T,B1,B2,B3,B4,B5,B6,B7>::type> boost::bind(R (__thiscall T::* )(B1,B2,B3,B4,B5,B6,B7,B8) const,A1,A2,A3,A4,A5,A6,A7,A8,A9)' : expects 10 arguments - 3 provided
c:\usr\boost\boost\bind\bind_mf_cc.hpp(223) : see declaration of 'boost::bind'
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk