Hi Peeps
I have this cut down code example
#include <vector>
#include <map>
#include <algorithm>
#include <boost/shared_ptr.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
template < typename Iter, typename Pred >
bool any_of_if( Iter first, Iter last, Pred pred )
{ return std :: find_if( first, last, pred ) != last; }
struct A { };
bool fnOfA( const A & );
typedef std :: vector< boost :: shared_ptr< A > > VecOfPtr;
typedef std :: map< int, VecOfPtr > MapOfVecOfPtr;
bool contains_if(
const VecOfPtr &,
bool ( * pred )( const VecOfPtr :: value_type :: value_type &)
);
bool f( const boost :: shared_ptr< MapOfVecOfPtr > & myMap )
{
using namespace boost;
return any_of_if(
myMap -> begin( ),
myMap -> end( ),
lambda :: bind(
contains_if,
lambda :: bind( & MapOfVecOfPtr :: value_type :: second, lambda :: _1 ),
fnOfA
)
);
}
This compiles under gcc (3.4.4), but under Vis Studio 2008 gives a huge error message,
(attached), but summarised as
boost\boost/tuple/detail/