Boost logo

Boost Users :

From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2007-08-01 13:49:35


On 12/18/06, john.wismar_at_[hidden] <john.wismar_at_[hidden]> wrote:
> 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 <boost/lambda/bind.hpp>
> 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<long, choice> answers;
>
> std::transform(questions.begin(), questions.end(),
> std::inserter(answers, answers.begin()),
> bind(std::make_pair<long, choice>, _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> (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<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>'
> being compiled
> with
> [
> T0=std::pair<long,main::choice> (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_at_[hidden]

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


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