[lambda] warnings from Lambda

I'm finding that pretty much every lambda :: bind call I make is producing a c4180 warning under Microsoft which I think is warning about the application a meaningless qualifier to the first argument of the bind call. So given, say bool f( int ); lambda::bind( f, lambd::_1 ); inside lambda_traits a const qualifier is applied to f, which is already const, hence the warning. Anyone know how to avoid this, other than #pragma to disable the warning? Thanks, - Rob.

AMDG Robert Jones wrote:
I'm finding that pretty much every lambda :: bind call I make is producing a c4180 warning under Microsoft which I think is warning about the application a meaningless qualifier to the first argument of the bind call.
So given, say
bool f( int );
lambda::bind( f, lambd::_1 );
inside lambda_traits a const qualifier is applied to f, which is already const, hence the warning.
Anyone know how to avoid this, other than #pragma to disable the warning?
Boost version? Compiler version? It compiles cleanly for me with the trunk and vc9, warning level 4. In Christ, Steven Watanabe

On Mon, Jun 15, 2009 at 2:06 PM, Steven Watanabe
AMDG
Robert Jones wrote:
I'm finding that pretty much every lambda :: bind call I make is producing a c4180 warning under Microsoft which I think is warning about the application a meaningless qualifier to the first argument of the bind call.
So given, say
bool f( int );
lambda::bind( f, lambd::_1 );
inside lambda_traits a const qualifier is applied to f, which is already const, hence the warning.
Anyone know how to avoid this, other than #pragma to disable the warning?
Boost version? Compiler version? It compiles cleanly for me with the trunk and vc9, warning level 4.
In Christ, Steven Watanabe
Boost 1.33.1, VC++ 2005 - I'd forgotten I'm using such an old version of Boost, as I'm working on an older version of our product at the moment! Thanks, Rob.

AMDG Robert Jones wrote:
On Mon, Jun 15, 2009 at 2:06 PM, Steven Watanabe
wrote: Robert Jones wrote:
So given, say
bool f( int );
lambda::bind( f, lambd::_1 );
inside lambda_traits a const qualifier is applied to f, which is already const, hence the warning.
Anyone know how to avoid this, other than #pragma to disable the warning?
Boost version? Compiler version? It compiles cleanly for me with the trunk and vc9, warning level 4.
Boost 1.33.1, VC++ 2005 - I'd forgotten I'm using such an old version of Boost, as I'm working on an older version of our product at the moment!
Okay. You might try explicitly taking the address of f, but you may get other warnings since until about 6 months ago, Boost.Lambda was pretty noisy In Christ, Steven Watanabe
participants (2)
-
Robert Jones
-
Steven Watanabe