Building rs_t265_vio error
Hello ,
I am building Basalt for Monado.but get the error this :
/home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:394:68: error: ‘class std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >’ has no member named ‘size’
394 | if (curr_vis_data.get() && cam_id < curr_vis_data->projections.size()) {
| ^~~~
/home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:395:54: error: no match for ‘operator[]’ (operand types are ‘std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >’ and ‘size_t’ {aka ‘long unsigned int’})
395 | const auto& points = curr_vis_data->projections[cam_id];
| ^
/home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:401:51: error: no matching function for call to ‘begin(std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >&)’
401 | for (const auto& points2 : curr_vis_data->projections)
| ^~~~~~~~~~~
In file included from /usr/include/c++/11/utility:76,
from /usr/include/c++/11/algorithm:60,
from /home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:36:
/usr/include/c++/11/initializer_list:90:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)’
90 | begin(initializer_list<_Tp> __ils) noexcept
| ^~~~~
/usr/include/c++/11/initializer_list:90:5: note: template argument deduction/substitution failed:
/home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:401:51: note: ‘std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >’ is not derived from ‘std::initializer_list<_Tp>’
401 | for (const auto& points2 : curr_vis_data->projections)
| ^~~~~~~~~~~
In file included from /usr/include/c++/11/array:41,
from /usr/include/c++/11/tuple:39,
from /usr/include/c++/11/functional:54,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:36:
/usr/include/c++/11/bits/range_access.h:51:5: note: candidate: ‘template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&)’
51 | begin(_Container& __cont) -> decltype(__cont.begin())
| ^~~~~
/usr/include/c++/11/bits/range_access.h:51:5: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/range_access.h: In substitution of ‘template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&) [with _Container = std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >]’:
/home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:401:51: required from here
/usr/include/c++/11/bits/range_access.h:51:50: error: ‘class std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >’ has no member named ‘begin’
51 | begin(_Container& __cont) -> decltype(__cont.begin())
| ~~~~~~~^~~~~
/usr/include/c++/11/bits/range_access.h:61:5: note: candidate: ‘template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&)’
61 | begin(const _Container& __cont) -> decltype(__cont.begin())
| ^~~~~
/usr/include/c++/11/bits/range_access.h:61:5: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/range_access.h: In substitution of ‘template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&) [with _Container = std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >]’:
/home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:401:51: required from here
/usr/include/c++/11/bits/range_access.h:61:56: error: ‘const class std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >’ has no member named ‘begin’
61 | begin(const _Container& __cont) -> decltype(__cont.begin())
| ~~~~~~~^~~~~
/usr/include/c++/11/bits/range_access.h:90:5: note: candidate: ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])’
90 | begin(_Tp (&__arr)[_Nm]) noexcept
| ^~~~~
/usr/include/c++/11/bits/range_access.h:90:5: note: template argument deduction/substitution failed:
/home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:401:51: note: mismatched types ‘_Tp [_Nm]’ and ‘std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >’
401 | for (const auto& points2 : curr_vis_data->projections)
| ^~~~~~~~~~~
In file included from /usr/include/c++/11/array:41,
from /usr/include/c++/11/tuple:39,
from /usr/include/c++/11/functional:54,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:36:
/usr/include/c++/11/bits/range_access.h:107:31: note: candidate: ‘template<class _Tp> _Tp* std::begin(std::valarray<_Tp>&)’
107 | template<typename _Tp> _Tp* begin(valarray<_Tp>&);
| ^~~~~
/usr/include/c++/11/bits/range_access.h:107:31: note: template argument deduction/substitution failed:
/home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:401:51: note: ‘std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >’ is not derived from ‘std::valarray<_Tp>’
401 | for (const auto& points2 : curr_vis_data->projections)
| ^~~~~~~~~~~
In file included from /usr/include/c++/11/array:41,
from /usr/include/c++/11/tuple:39,
from /usr/include/c++/11/functional:54,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:36:
/usr/include/c++/11/bits/range_access.h:108:37: note: candidate: ‘template<class _Tp> const _Tp* std::begin(const std::valarray<_Tp>&)’
108 | template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
| ^~~~~
/usr/include/c++/11/bits/range_access.h:108:37: note: template argument deduction/substitution failed:
/home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:401:51: note: ‘std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >’ is not derived from ‘const std::valarray<_Tp>’
401 | for (const auto& points2 : curr_vis_data->projections)
| ^~~~~~~~~~~
/home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:401:51: error: no matching function for call to ‘end(std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >&)’
In file included from /usr/include/c++/11/utility:76,
from /usr/include/c++/11/algorithm:60,
from /home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:36:
/usr/include/c++/11/initializer_list:101:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)’
101 | end(initializer_list<_Tp> __ils) noexcept
| ^~~
/usr/include/c++/11/initializer_list:101:5: note: template argument deduction/substitution failed:
/home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:401:51: note: ‘std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >’ is not derived from ‘std::initializer_list<_Tp>’
401 | for (const auto& points2 : curr_vis_data->projections)
| ^~~~~~~~~~~
In file included from /usr/include/c++/11/array:41,
from /usr/include/c++/11/tuple:39,
from /usr/include/c++/11/functional:54,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:36:
/usr/include/c++/11/bits/range_access.h:71:5: note: candidate: ‘template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)’
71 | end(_Container& __cont) -> decltype(__cont.end())
| ^~~
/usr/include/c++/11/bits/range_access.h:71:5: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/range_access.h: In substitution of ‘template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&) [with _Container = std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 4, 1> > > > >]’:
/home/feng/slam/bsltdeps/basalt/src/rs_t265_vio.cpp:401:51: required from here
/usr/include/c++/11/bits/range_access.h:71:48: error: ‘class std::shared_ptr<std::vector<std::vector<Eigen::Matrix<double, 4, 1>, Eigen::aligned_allocator<Eigen::Matrix<doubl ~~~~~~~^~~~~ ^~~~~~~~~~~
it seems like c++ 11 error. so I add -std=c++11 ,The error remains.
ubuntu 18.04 gcc11, g++11
Edited by Seven