Boost logo

Boost Users :

Subject: Re: [Boost-users] [bind/lambda] Matching signature constness?
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-12-10 13:46:35


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 10 December 2008 10:41 am, Robert Jones wrote:
> function< bool( unsigned ) > e = bind( is_zero< T >, element( _1 ) );

I think you wanted to do a nested bind (and you're missing an address-of
operator):

function< bool( unsigned ) > e = bind( &is_zero< T >, bind( element, _1 ) );

> element.cpp:21: error: no match for call to `(boost::function<const
> int&()(unsigned int)>) (const boost::lambda::lambda_
> functor<boost::lambda::placeholder<1> >&)'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFJQA6L5vihyNWuA4URAkpdAKC5k4hqcrNPdsqTP5JUK5nehvALJQCgkHeo
qeZcQpDkG9iq4pB6feb1Juk=
=IY+7
-----END PGP SIGNATURE-----


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net