Boost logo

Boost Users :

Subject: Re: [Boost-users] Bind and overloaded operators in Visual Studio 2008
From: Benjamin Swerts (Ben.Swerts_at_[hidden])
Date: 2008-11-13 05:19:30

> The bug you're seeing is in Dinkumware's bind, not boost's.
> Try using boost::bind explicitly and I suspect it will work fine.

Thanks for the quick answer. I replaced it with

#include <boost/bind.hpp>
std::find_if(v.begin(), v.end(), boost::bind( &Foo::first_, _1 ) == test

which works. I did, however, configure Visual Studio to prefer Boost's TR1
implementation by adding the following include directories before the
Microsoft includes (Tools->Options->Projects and Solutions->VC++
Directories->Include files):

- boost-root/boost/tr1/tr1
- boost-root

This worked as expected with VS2005 but with VS2008 the
Microsoft/Dinkumware includes are apparently still preferred.



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