【Solved】Compilation fails with “error: ‘decay_t’ is not a member of ‘std'”を解決する方法

ROSのcatkin_wsでbuildをした際に、以下のようなエラーが出てきた場合の解決方法を残しておく。

Compilation fails with "error: 'decay_t' is not a member of 'std'"

set(CMAKE_CXX_STANDARD 14)を追加すれば良い

CMakeLists.txtに以下を追加すればbuildしたときにエラーが出なくなる。

set(CMAKE_CXX_STANDARD 14)

C++14をサポートしているコンパイラーを指定してやる必要があるようだ。

参考

Compilation fails with "error: ‘decay_t’ is not a member of ‘std’" · Issue #3 · avast/yaracpp
yara_detector.cpp:55:17: error: ‘decay_t’ is not a member of ‘std’
c++ error: ‘decay_t’ is not a member of ‘std’解决方法_c++ abs not a member of-CSDN博客
文章浏览阅读6.4k次,点赞46次,收藏62次。《视觉SLAM十四讲》ch3中 c++ error: ‘decay_t’ is not a member of ‘std’解决方法_c++ abs not a member of
タイトルとURLをコピーしました