I have a Visual Studio 2008 C++03 application where I would like to use boost::lambda to perform this action:
enum { fooflag = 0x00000001; }
bool IsFooFlagActive( DWORD flags )
{
return ( flags & fooflag ) != 0;
}
Unfortunately, this doesn't work:
namespace bl = boost::lambda;
bool is_foo_flag_active = ( ( bl::_1 & fooflag ) != 0 )( 0x00000001 );
What's the correct way to get boost::lambda to perform compound expressions? Do I need to bind the != operator?
Thanks