Upgrade to enhance :: Signals2 in VS2013 leads to C4996 warnings

From the following compiler post in VS2013:

CL: warning: Boost.Signals is no longer supported and is now deprecated. Go to Boost.Signals2. To disable this warning message, define BOOST_SIGNALS_NO_DEPRECATION_WARNING .

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

Now there are even more numerous ugly warnings that go on and on when this is just the beginning:

 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 saw this previously asked question , as well as many others, where the only suggested solution is to disable the warning; however this is a great hammer approach. As @ heavy-rocker-dude noted in the post above, this even happens in the most trivial boost Hello World example (not cool).

Can someone suggest a solution that will solve the problem without compromising the warnings?

0
source share

All Articles