
Alright the second worked. Thanks a lot. using namespace std; using namespace boost; namespace fields { struct _id_; struct _name_; struct _birthday_; struct _address_id_; } typedef fusion::map< fusion::pair< fields::_id_ , string > , fusion::pair< fields::_name_ , string > , fusion::pair< fields::_birthday_ , string > , fusion::pair< fields::_address_id_, string > > table_type; int main() { table_type table; vector< table_type > vec; find_if( vec.begin() , vec.end() , bind( equal_to< string >() , bind( &fusion::at_key< fields::_id_, table_type const >, _1 ) , string( "Hallo" ))); return 0; } On 5/3/07, Peter Dimov <pdimov@mmltd.net> wrote:
Christian Henning wrote:
...
, bind( &fusion::at_key< fields::_id_ >, _1 )
...
test.cpp(43) : error C2783: 'result_of::at_key<const Sequence,Key>::type boost::fusion::at_key(const Sequence &)' : could not deduce template argument for 'Sequence'
Have you tried supplying the Sequence template parameter? Something like:
bind( &fusion::at_key< fields::_id_, table_type >, _1 )
or, if this doesn't work:
bind( &fusion::at_key< fields::_id_, table_type const >, _1 )
If this doesn't help, I'm afraid that your get_id wrapper is the best workaround. It's possible to cast &fusion::at_key<_id_> to the correct type, but I consider the get_id approach superior in general.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users