背景
在编译autoware/common/lanelet2_extension 模块包的时候,出现了boost、math/constants/constants.hpp:297:3: error: unable to find numeric literal operator ‘operator‘ 这个问题
解决方案
我的gcc版本是9.1.0,参考https://github.com/boostorg/math/issues/272这个网站上面的讨论,通过一下两个命令解决,在CMakeLists.txt中添加如下两个编译选项,第一个编译选项可以是 -std=c++11或者-std=gnu++11选择c++11编译选项,另外一个就是设置编译的标志,解决问题
add_compile_options(-std=c++11)
//add_compile_options(-std=gnu++11)
add_compile_options(-fext-numeric-literals)