error: ‘integer_sequence’ is not a member of ‘std’

本人在编译CAMODOCAL工程时遇到了该错误:

/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
 struct SumImpl<std::integer_sequence<T, N, Ns...>> {
                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:46: error: wrong number of template arguments (3, should be 1)
 struct SumImpl<std::integer_sequence<T, N, Ns...>> {
                                              ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
 struct SumImpl;
        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:49: error: expected unqualified-id before ‘>’ token
 struct SumImpl<std::integer_sequence<T, N, Ns...>> {
                                                 ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
 struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:51: error: wrong number of template arguments (4, should be 1)
 struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
                                                   ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
 struct SumImpl;
        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:54: error: expected unqualified-id before ‘>’ token
 struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
                                                      ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’
 struct SumImpl<std::integer_sequence<T, N1, N2, N3, N4, Ns...>> {
                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’

归根结底是ceres的版本问题,网上有很多解决办法,对于别的工程可能管用:

修改cmakelists文件中:

set(CMAKE_CXX_FLAGS "-std=c++11")

为:

set(CMAKE_CXX_STANDARD 11)

或者:

set(CMAKE_CXX_STANDARD 14)

详细可见ceres的源代码说明:

https://github.com/ceres-solver/ceres-solver/issues/604

但如果还是不行,比如本人编译CamOdoCal这种老项目,可以将ceres版本退回到1.1.4,感谢网友,详细操作可以见此链接:

https://blog.csdn.net/qq_41586768/article/details/107541917?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.nonecase&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.nonecaseicon-default.png?t=LA92https://blog.csdn.net/qq_41586768/article/details/107541917?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.nonecase&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.nonecase

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值