У меня есть код, компилируемый с помощью ns-3, но я сталкиваюсь с некоторыми проблемами, когда пытаюсь их скомпилировать. Я думаю, что причина может заключаться в том, что некоторые функции устарели в C ++ 11. Но я не знаю, как пересмотреть код.
Вот код, который я думаю, должен быть пересмотрен:
m_sendBuffer.erase(
std::remove_if(
m_sendBuffer.begin(), m_sendBuffer.end(),
std::bind2nd(std::ptr_fun(DsrSendBuffer::IsEqual), dst)
),
m_sendBuffer.end()
);
Вот ошибка:
../src/dsr/model/dsr-rsendbuff.cc:102:55: error: 'ptr_fun<ns3::dsr::DsrSendBuffEntry, ns3::Ipv4Address, bool>' is deprecated [-Werror,-Wdeprecated-declarations]
std::bind (std::ptr_fun (DsrSendBuffer::IsEqual), dst)), m_sendBuffer.end ());
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1115:1: note: 'ptr_fun<ns3::dsr::DsrSendBuffEntry, ns3::Ipv4Address, bool>' has been explicitly marked deprecated here
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1101:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX11'
define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1090:48: note: expanded from macro '_LIBCPP_DEPRECATED'
define _LIBCPP_DEPRECATED __attribute__ ((deprecated))