0

From the following compiler warning message in VS2013:

CL : warning : Boost.Signals is no longer being maintained and is now deprecated. Please switch to Boost.Signals2. To disable this warning message, define BOOST_SIGNALS_NO_DEPRECATION_WARNING.

I upgraded my code from boost::signals to boost::signals2.

Now there are even more numerous ugly warnings that go on and on and on, where this is just the start of it:

1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xmemory(348): warning C4996: 'std::_Uninitialized_copy0': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xmemory(333) : see declaration of 'std::_Uninitialized_copy0'
1>          C:\Dev\ThirdParty\Boost\include\boost-1_59\boost/signals2/detail/auto_buffer.hpp(191) : see reference to function template instantiation '_FwdIt std::uninitialized_copy<I,boost::shared_ptr<void>*>(_InIt,_InIt,_FwdIt)' being compiled
1>          with
1>          [
1>              _FwdIt=boost::shared_ptr<void> *
1>  ,            I=boost::shared_ptr<void> *
1>  ,            _InIt=boost::shared_ptr<void> *
1>          ]
1>          C:\Dev\ThirdParty\Boost\include\boost-1_59\boost/signals2/detail/auto_buffer.hpp(178) : see reference to function template instantiation 'void boost::signals2::detail::auto_buffer<boost::shared_ptr<void>,boost::signals2::detail::store_n_objects<10>,boost::signals2::detail::default_grow_policy,std::allocator<T>>::copy_rai<I,false>(I,I,boost::shared_ptr<void> *,const boost::integral_constant<bool,false> &)' being compiled
1>          with
1>          [
1>              T=boost::shared_ptr<void>
1>  ,            I=boost::shared_ptr<void> *
1>          ]

I have seen this previously asked question and also many others, where the only solution suggested is to disable the warning; however that is a big hammer approach. As noted by @heavy-rocker-dude in the post above, this even occurs in the most trivial boost Hello World example (not cool).

Can anyone propose a solution that actually resolves the problem without compromising warnings?

Community
  • 1
  • 1
David Carr
  • 400
  • 4
  • 7
  • 1
    If you're that fond of useless warnings, you should check out MSVC's `/Wall` option, you'll love it. – Praetorian Mar 23 '16 at 02:25
  • 25+ years working in the world of MS I understand well the sarcasm, but it is also noise and am looking for solutions. – David Carr Mar 23 '16 at 17:38
  • You don't seem to understand that there is no *solution* to this problem (I hope I'm wrong here, but pretty sure I'm not). MSVC is complaining about perfectly good code. If you google "c4996 boost" you'll find several tickets that have been closed as won't fix because there is no way to fix this, other than by disabling these warnings. – Praetorian Mar 23 '16 at 18:06
  • Thx for your input. Let's you and I leave this to others to input, with the hope something has changed in the 3+ years since your response to heavy-rocker-dude. – David Carr Mar 23 '16 at 21:43
  • An answer is in stackoverflow. http://stackoverflow.com/a/7889840/3239341 – Hill May 15 '17 at 14:34

0 Answers0