Re: [boost] [Boost-users] [function] vs2005 warning

Michael Marcin wrote:
Peter Dimov wrote:
Michael Marcin wrote:
Hi,
I'm using a few day old RC_1_34_0 from cvs.
In boost\function\function_base.hpp I get a warning message that is quite annoying so I went in to remove it.
The thing is I don't understand what it is complaining about. It gives this warning message:
boost/function/function_base.hpp(287) : warning C4189: 'out_functor'
local variable is initialized but not referenced
But the code is:
functor_type* out_functor = reinterpret_cast<functor_type*>(&out_buffer.data); // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type. out_functor->~Functor();
which looks a lot like it is referencing out_functor to me.. can this warning be disabled
I think that changing to
reinterpret_cast<functor_type*>(&out_buffer.data)->~Functor();
can fix it.
Yes that removes the warning it'd be great if that could be patched into RC_1_34_0 & HEAD.
I don't know about the RC... it's probably a bit late for that.
There are lots more annoying warnings (just at warning level 3). I know many people work with a strict no warning policy.
Can you please post specific examples?
Are these things that are going to be addressed before 1.34 is released?
My guess is that they won't. It ultimately depends on the release manager, though.

Peter Dimov wrote:
Michael Marcin wrote:
<snip>
I don't know about the RC... it's probably a bit late for that.
There are lots more annoying warnings (just at warning level 3). I know many people work with a strict no warning policy.
Can you please post specific examples?
Sure, the first 2 come up quite often the rest are less bothersome. boost/signals/trackable.hpp(185) : warning C4512: 'boost::signals::detail::bound_objects_visitor' : assignment operator could not be generated boost/signals/trackable.hpp(65) : see declaration of 'boost::signals::detail::bound_objects_visitor' ---------- boost/program_options/options_description.hpp(232) : warning C4512: 'boost::program_options::options_description' : assignment operator could not be generated boost/program_options/options_description.hpp(156) : see declaration of 'boost::program_options::options_description' ---------- program_options\cmdline.cpp(294) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) ---------- cmdline.cpp(465) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) ---------- boost\inc\boost/lexical_cast.hpp(138) : warning C4127: conditional expression is constant boost/lexical_cast.hpp(134) : while compiling class template member function 'boost::detail::lexical_stream<Target,Source>::lexical_stream(void)' with [ Target=std::string, Source=NewSource ] lexical_cast.hpp(219) : see reference to class template instantiation 'boost::detail::lexical_stream<Target,Source>' being compiled with [ Target=std::string, Source=NewSource ] value_semantic.hpp(190) : see reference to function template instantiation 'Target boost::lexical_cast<std::string,T>(const Source &)' being compiled with [ Target=std::string, T=bool, Source=bool ] value_semantic.hpp(188) : while compiling class template member function 'boost::program_options::typed_value<T> *boost::program_options::typed_value<T>::default_value(const T &)' with [ T=bool ] program_options\value_semantic.cpp(115) : see reference to class template instantiation 'boost::program_options::typed_value<T>' being compiled with [ T=bool ]
participants (2)
-
Michael Marcin
-
Peter Dimov