OpenRTM / OpenRTM-aist

OpenRTM-aist: RT-Middleware and OMG RTC implementation in C++ implemented by AIST
https://openrtm.org/
Other
19 stars 12 forks source link

gcc: std::auto_ptr is deprecated #67

Closed r-kurose closed 5 years ago

r-kurose commented 5 years ago

Describe the bug gcc の C++ デフォルトは c++14 なので、 c++98 を前提としているコードで警告がでる。

To Reproduce

  1. cmake
  2. make

Reproducibility 100%

Expected behavior サポートする C++ バージョンを明確にし、言語仕様に従ったコードとなること。

Screenshots or Logs

/root/OpenRTM-aist/src/lib/rtm/PortBase.cpp: In member function 'const string RTC::PortBase::getUUID() const':
/root/OpenRTM-aist/src/lib/rtm/PortBase.cpp:779:10: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr<coil::UUID> uuid(uugen.generateUUID(2, 0x01));
           ^

Environment

Additional context

r-kurose commented 5 years ago

gcc は Linux のどのディストリビューションも C++14 をサポートするが、 MSVC の 2015 以前は C++11 にしか対応してない。 よって、 C++11 をデフォルトとする。 (2019-02-18 うちあわせ)

r-kurose commented 5 years ago

例外使用の変更 throw -> noexcept の対応も必要

r-kurose commented 5 years ago

255 が出来たのでこちらでの作業は完了