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 09:37:58


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

On Wednesday 10 December 2008 07:55 am, Robert Jones wrote:
> template < typename T, std :: size_t sz >
> static bool cmp( const T ( & lhs )[ sz ], const T ( & rhs )[ sz ] )
> {
> using boost :: lambda :: _1;
> using boost :: lambda :: bind;
> using boost :: lambda :: var;
>
> boost :: function< bool( unsigned ) > cmp_element =
> bind( cmp_detail< boost :: is_array< T > :: value > :: cmp,
> var( lhs )[ _1 ], var( rhs )[ _1 ] );

For one thing, you are trying to bind a template member function without
specifying its template parameters (you only specified the template parameter
of the class, not the method which is also a template), which you can't do.

> block.cpp:32: error: no matching function for call to `bind(<unknown type>,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFJP9RL5vihyNWuA4URAkf3AJ4x5bpR87hiDD8dRVJdwqOc6mWHSwCggUaq
T3l3AZqpimNGhYzpqR6bsQs=
=+bkb
-----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