0

来自 VS2013 中的以下编译器警告消息:

CL : 警告 : Boost.Signals 不再维护,现在已弃用。请切换到 Boost.Signals2。要禁用此警告消息,请定义BOOST_SIGNALS_NO_DEPRECATION_WARNING.

我将代码从升级boost::signalsboost::signals2.

现在还有更多的丑陋警告不断出现,这只是它的开始:

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>          ]

我已经看到了这个先前提出的问题以及许多其他问题,其中建议的唯一解决方案是禁用警告;然而,这是一个大锤子方法。正如@heavy-rocker-dude 在上面的帖子中所指出的,这甚至发生在最微不足道的 boost Hello World 示例中(不酷)。

任何人都可以提出一个在不影响警告的情况下实际解决问题的解决方案吗?

4

0 回答 0