Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-07-11 07:52:12


[I have posted this to microsoft.public.dotnet.languages.vc]

I'm working on a Boost library called 'bind' that is a generalization of
std::bind1st/bind2nd. Here are some problems that I have with VC 7.0:

[1]

void f(int &);

struct X
{
 operator int & () const;
};

int main()
{
 f(X()); // C2664
}

[2]

namespace boost
{
 template<class R> void bind();
}

int main()
{
 using boost::bind;

 bind<void>(); // C2062, boost::bind<void>() works
}

[3]

#include <boost/function.hpp> // from www.boost.org

namespace boost
{
 template<class R> void bind();
}

int main()
{
 boost::bind<void>(); // C2062
}

The interesting thing about this example is that when I rename 'bind' to
'bind2', or 'bind_msvc', it works.

--
Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk