[lambda][1.33.1] Lambda warnings after installing VS2005 SP1
I have just installed Service Pack 1 for VS2005, and am now getting a
warning in some code using lambda::bind. There wasn't a warning
previously, but I don't know if the issue is due to an update to the C++
standard library, a legitimate warning that they weren't flagging before,
or a spurious warning. It looks like the issue is that I'm passing a
function pointer, to bind. Is this a warning I should just ignore, or is
this a legitimate issue?
Thanks for your help!
Here's a sample app, followed by the warnings I'm seeing.
#include
On 12/18/06, john.wismar@autozone.com
I have just installed Service Pack 1 for VS2005, and am now getting a warning in some code using lambda::bind. There wasn't a warning previously, but I don't know if the issue is due to an update to the C++ standard library, a legitimate warning that they weren't flagging before, or a spurious warning. It looks like the issue is that I'm passing a function pointer, to bind. Is this a warning I should just ignore, or is this a legitimate issue?
Thanks for your help!
Here's a sample app, followed by the warnings I'm seeing.
#include
using boost::lambda::bind; using boost::lambda::_1; #include <vector> #include <map> #include <algorithm>
int main() { enum choice { select, reject };
std::vector<long> questions; std::map
answers; std::transform(questions.begin(), questions.end(), std::inserter(answers, answers.begin()), bind(std::make_pair
, _1, select)); return 0; }
c:\boost\boost\lambda\detail\lambda_traits.hpp(389) : warning C4180: qualifier applied to function type has no meaning; ignored c:\boost\boost\lambda\detail\lambda_traits.hpp(458) : see reference to class template instantiation 'boost::lambda::detail::bind_traits<T>' being compiled with [ T=std::pair
(long,main::choice) ] c:\temp\lambda_warning_test\lambda_warning_test.cpp(20) : see reference to class template instantiation 'boost::lambda::detail::bind_tuple_mapper ' being compiled with [ T0=std::pair (long,main::choice), T1=boost::lambda::placeholder1_type, T2=const main::choice, T3=boost::tuples::null_type, T4=boost::tuples::null_type, T5=boost::tuples::null_type, T6=boost::tuples::null_type, T7=boost::tuples::null_type, T8=boost::tuples::null_type, T9=boost::tuples::null_type ] -------------------------------- John Wismar john.wismar@autozone.com
Was there ever any resolution on this? I'm seeing the same thing, only in my case T = void (const boost::xtime &) (ie function taking boost::xtime) I understand it probably isn't an important warning, but it is annoying. Tony
participants (2)
-
Gottlob Frege
-
john.wismar@autozone.com